You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a multi-thread situation there could be native crashes around mocking of static methods (issue #97), even though client doesn't write any native code.
Thread A is running Java_com_android_dx_mockito_inline_StaticMockMethodAdvice_nativeGetCalledClassName() in staticjvmtiagent/agent.cc.
Thread B is the crashing thread that is calling file loaded callbacks to handle classes retransformation, due to an explicit call into Java_com_android_dx_mockito_inline_JvmtiAgent_nativeRetransformClasses() in dexmakerjvmtiagent/agent.cc.
Sequence of events:
(Thread A) Registers file loaded callback using jvmtiEnv->SetEventCallbacks()
(Thread B) JVMTI collects event handler in CollectEvents(), called by DispatchClassFileLoadHookEvent() in events_inl.h
(Thread A) Disposes environment using jvmtiEnv->DisposeEnvironment()
(Thread B) JVMTI into the callback set in Thread A with a disposed jvmtiEnv, and crash.
The text was updated successfully, but these errors were encountered:
ttanxu
added a commit
to ttanxu/dexmaker
that referenced
this issue
Jan 23, 2019
If there are other threads asking for class restransformation
InspectClass may be called during the transient period of time when the
callback is enabled. More importantly InspectClass could be called after
jvmti env is disposed, which would lead to native crashes.
This should fix issue linkedin#134.
If there are other threads asking for class restransformation
InspectClass may be called during the transient period of time when the
callback is enabled. More importantly InspectClass could be called after
jvmti env is disposed, which would lead to native crashes.
This should fix issue linkedin#134.
Also change .travis.yml to accept new license for NDK.
If there are other threads asking for class restransformation
InspectClass may be called during the transient period of time when the
callback is enabled. More importantly InspectClass could be called after
jvmti env is disposed, which would lead to native crashes.
This should fix issue #134.
Also change .travis.yml to accept new license for NDK.
In a multi-thread situation there could be native crashes around mocking of static methods (issue #97), even though client doesn't write any native code.
Thread A is running Java_com_android_dx_mockito_inline_StaticMockMethodAdvice_nativeGetCalledClassName() in staticjvmtiagent/agent.cc.
Thread B is the crashing thread that is calling file loaded callbacks to handle classes retransformation, due to an explicit call into Java_com_android_dx_mockito_inline_JvmtiAgent_nativeRetransformClasses() in dexmakerjvmtiagent/agent.cc.
Sequence of events:
(Thread A) Registers file loaded callback using jvmtiEnv->SetEventCallbacks()
(Thread B) JVMTI collects event handler in CollectEvents(), called by DispatchClassFileLoadHookEvent() in events_inl.h
(Thread A) Disposes environment using jvmtiEnv->DisposeEnvironment()
(Thread B) JVMTI into the callback set in Thread A with a disposed jvmtiEnv, and crash.
The text was updated successfully, but these errors were encountered: