Merge pull request #2593 from ludovic-henry/coop-fix-native-to-managed
[mono.git] / mono / mini / driver.c
index 963ceccb560316d30a58444f635c48f1ef8f1ede..0f6aed5e6737c544d6ee25fc4e42f96c544d2484 100644 (file)
@@ -1158,7 +1158,8 @@ load_agent (MonoDomain *domain, char *desc)
 
        pa [0] = main_args;
        /* Pass NULL as 'exc' so unhandled exceptions abort the runtime */
-       mono_runtime_invoke (method, NULL, pa, NULL);
+       mono_runtime_invoke_checked (method, NULL, pa, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
 
        return 0;
 }
@@ -1927,6 +1928,11 @@ mono_main (int argc, char* argv[])
        }
 #endif
 
+#ifdef DISABLE_HW_TRAPS
+       // Signal handlers not available
+       opt->explicit_null_checks = TRUE;
+#endif
+
        if (!argv [i]) {
                mini_usage ();
                return 1;