Add Thread entry to signal if the thread can call into java
Compiler threads (AOT or JIT) should not call into Java as they have no
peers (which may lead to crashes, e.g. b/33067273)
Bug: 32602185
Bug: 33067273
Test: m test-art-host-run-test; m test-art-host-gtest
Change-Id: I97dda7a5444643db3c5d5318339a65a602f709e8
diff --git a/runtime/thread.cc b/runtime/thread.cc
index d79bf36..da49ac6 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -1802,7 +1802,11 @@
}
}
-Thread::Thread(bool daemon) : tls32_(daemon), wait_monitor_(nullptr), interrupted_(false) {
+Thread::Thread(bool daemon)
+ : tls32_(daemon),
+ wait_monitor_(nullptr),
+ interrupted_(false),
+ can_call_into_java_(true) {
wait_mutex_ = new Mutex("a thread wait mutex");
wait_cond_ = new ConditionVariable("a thread wait condition variable", *wait_mutex_);
tlsPtr_.instrumentation_stack = new std::deque<instrumentation::InstrumentationStackFrame>;