Shutdown the compiler thread before the dvmSlayDaemons call is made.
diff --git a/vm/Init.c b/vm/Init.c
index d624c23..3663745 100644
--- a/vm/Init.c
+++ b/vm/Init.c
@@ -1540,6 +1540,11 @@
     /* shut down stdout/stderr conversion */
     dvmStdioConverterShutdown();
 
+#ifdef WITH_JIT
+    /* tell the compiler to shut down if it was started */
+    dvmJitShutdown();
+#endif
+
     /*
      * Kill any daemon threads that still exist.  Actively-running threads
      * are likely to crash the process if they continue to execute while
@@ -1549,9 +1554,6 @@
 
     LOGD("VM cleaning up\n");
 
-#ifdef WITH_JIT
-    dvmJitShutdown();
-#endif
     dvmDebuggerShutdown();
     dvmReflectShutdown();
 #ifdef WITH_PROFILER