dukeify / fake-jni

An implementation of the JNI and JVMTI with support for direct interaction between natively registered classes and JVM objects.
Other
27 stars 10 forks source link

Set the thread_local Jvm::currentVm when attaching and detaching libraries #79

Closed Matthewacon closed 4 years ago

Matthewacon commented 4 years ago

Error handling during vm execution phases is dependent on the Jvm::currentVm thread local, if it is not set during the attach or detach phase of execution, then errors thrown by native libraries will not be caught by the default fake-jni signal handler.

Also Jvm::attachLibrary and Jvm::detachLibrary should block on recurrent and pair invocation but not on vm execution.