Fail threads attaching during runtime shutdown.
Introduce counters to indicate that threads are being born. Don't allow
thread birth to occur during runtime shutdown.
Bug: 7000936
Change-Id: Ib0d78f78c0ff126a4b5d3b5a6f1a2ff8f5061ae9
diff --git a/src/compiler.cc b/src/compiler.cc
index af8292f..edadc12 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1019,7 +1019,7 @@
WorkerThread* worker = reinterpret_cast<WorkerThread*>(arg);
Runtime* runtime = Runtime::Current();
if (worker->spawn_) {
- runtime->AttachCurrentThread("Compiler Worker", true, NULL);
+ CHECK(runtime->AttachCurrentThread("Compiler Worker", true, NULL));
}
worker->Run();
if (worker->spawn_) {