Ensure exception out argument is initialized to NULL. (#5424)
[mono.git] / mono / mini / driver.c
index f8287c722d2a462f3f10a99c512813323156895f..297179bf86cabaa76b112108bb7a977d9c65db1f 100644 (file)
@@ -1420,7 +1420,7 @@ mono_jit_parse_options (int argc, char * argv[])
                        opt->break_on_exc = TRUE;
                } else if (strcmp (argv [i], "--stats") == 0) {
                        mono_counters_enable (-1);
-                       mono_stats.enabled = TRUE;
+                       InterlockedWriteBool (&mono_stats.enabled, TRUE);
                        mono_jit_stats.enabled = TRUE;
                } else if (strcmp (argv [i], "--break") == 0) {
                        if (i+1 >= argc){
@@ -1767,7 +1767,7 @@ mono_main (int argc, char* argv[])
                        mono_print_vtable = TRUE;
                } else if (strcmp (argv [i], "--stats") == 0) {
                        mono_counters_enable (-1);
-                       mono_stats.enabled = TRUE;
+                       InterlockedWriteBool (&mono_stats.enabled, TRUE);
                        mono_jit_stats.enabled = TRUE;
 #ifndef DISABLE_AOT
                } else if (strcmp (argv [i], "--aot") == 0) {
@@ -2378,6 +2378,12 @@ mono_jit_set_aot_mode (MonoAotMode mode)
        }
 }
 
+mono_bool
+mono_jit_aot_compiling (void)
+{
+       return mono_compile_aot;
+}
+
 /**
  * mono_jit_set_trace_options:
  * \param options string representing the trace options