Don't assert that all threads have stopped.
If assertions were enabled and we had a daemon thread running, the VM
would fail on exit.
diff --git a/vm/Thread.c b/vm/Thread.c
index 3102a47..2e982d8 100644
--- a/vm/Thread.c
+++ b/vm/Thread.c
@@ -410,8 +410,12 @@
void dvmThreadShutdown(void)
{
if (gDvm.threadList != NULL) {
- assert(gDvm.threadList->next == NULL);
- assert(gDvm.threadList->prev == NULL);
+ /*
+ * If we walk through the thread list and try to free the
+ * lingering thread structures (which should only be for daemon
+ * threads), the daemon threads may crash if they execute before
+ * the process dies. Let them leak.
+ */
freeThread(gDvm.threadList);
gDvm.threadList = NULL;
}