Make sure threads allocating are in the kRunnable state
Change-Id: I55a08fcd38b3388698ef571d2d4fa9553210e197
diff --git a/src/java_lang_System.cc b/src/java_lang_System.cc
index d8e8a5a..45a2aee 100644
--- a/src/java_lang_System.cc
+++ b/src/java_lang_System.cc
@@ -111,6 +111,7 @@
}
void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, jobject javaDst, jint dstPos, jint length) {
+ ScopedThreadStateChange tsc(Thread::Current(), Thread::kRunnable);
Thread* self = Thread::Current();
// Null pointer checks.