Skip to content

Instantly share code, notes, and snippets.

View kumpera's full-sized avatar

Rodrigo Kumpera kumpera

View GitHub Profile
using System;
using System.Threading;
using System.Net;
using System.Net.Sockets;
class Driver {
static bool BrokeConnect;
static void TryConnect (Socket s) {
try {
0x00508460: test %eax,%eax
0x00508462: je 0x50848d
0x00508464: mov 0x4(%eax),%ecx
0x00508467: test %ecx,%ecx
0x00508469: je 0x50848d
0x0050846b: mov %gs:0x448,%edx
0x00508472: mov 0x30(%edx),%edx
0x00508475: cmpl $0x0,(%ecx) <<<<<<<<<<<<<<<
diff --git a/mono/utils/mono-dl-fallback.h b/mono/utils/mono-dl-fallback.h
index 06945ae..f6ed4e1 100644
--- a/mono/utils/mono-dl-fallback.h
+++ b/mono/utils/mono-dl-fallback.h
@@ -11,6 +11,11 @@ enum {
MONO_DL_MASK = 3
};
+typedef enum {
+ MONO_DL_BEFORE_NATIVE,
diff --git a/TweetStation/Main.cs b/TweetStation/Main.cs
index e0efa09..4095e4d 100644
--- a/TweetStation/Main.cs
+++ b/TweetStation/Main.cs
@@ -40,7 +40,10 @@ namespace TweetStation
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
Util.ReportTime ("Entering Finished");
-
+ var t = new Thread (() => { while (true) {GC.Collect (); Thread.Sleep (400); } });
using System;
using System.Threading;
class Driver {
~Driver () {
Console.WriteLine ("FIN");
throw new Exception ();
}
static void Main () {
Apr 24 21:06:19 unknown UIKitApplication:org.tirania.tweetstation[0xea54][1879] <Notice>: [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Console ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for MonoTouch.Foundation.NSLogWriter ---> System.NullReferenceException: Object reference not set to an instance of an object
Apr 24 21:06:19 unknown UIKitApplication:org.tirania.tweetstation[0xea54][1879] <Notice>: at System.Console.WriteLine (System.String format, System.Object arg0, System.Object arg1, System.Object arg2) [0x00000] in <filename unknown>:0
Apr 24 21:06:19 unknown UIKitApplication:org.tirania.tweetstation[0xea54][1879] <Notice>: at MonoTouch.ObjCRuntime.Runtime.RegisterNSObject (MonoTouch.Foundation.NSObject obj, IntPtr ptr) [0x00000] in <filename unknown>:0
Apr 24 21:
using System;
using System.Diagnostics;
namespace BoxingTest
{
public interface ICriticalNotifyCompletion
{
void UnsafeOnCompleted(Action a);
void UnsafeOnCompleted2(Action a);
}
diff --git a/mono/metadata/sgen-os-posix.c b/mono/metadata/sgen-os-posix.c
index 5a1f53d..4005a3b 100644
--- a/mono/metadata/sgen-os-posix.c
+++ b/mono/metadata/sgen-os-posix.c
@@ -51,6 +51,7 @@ static MonoSemType suspend_ack_semaphore;
static MonoSemType *suspend_ack_semaphore_ptr;
static sigset_t suspend_signal_mask;
+static sigset_t suspend_ack_signal_mask;
What makes a bridge object?
A bridge object is a bridge class with a non-null handle.
What makes a bridge class?
A bridge class must respect the follow rules:
-Be a subclass of Java.Lang.Object; and
class Foo : Java.Lang.Object { Java.Lang.Object obj; }
var foo = new Foo();
var text = new EditText ();
var foo2 = new Foo ();
//The 3 objects are reachable from the stack
foo.obj = text;