Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Fix JNIEnv* share between start thread and receive thread #275
Browse files Browse the repository at this point in the history
This commit moves JNIEnv* variable from JAVA_MODULE_HANDLE_DATA structure to local variable.
The variable is assigned by JVM in AttachCurrentThread in both of start and receive functions,
it causes race condition of the variable, then segmentation fault is occurred in ExceptionOccurred JNI function.
So, the JNIEnv* variable should be local instead of a part of JAVA_MODULE_HANDLE_DATA.
  • Loading branch information
yfakariya committed May 26, 2017
1 parent 0f28685 commit f00b9c3
Showing 1 changed file with 75 additions and 73 deletions.
Loading

0 comments on commit f00b9c3

Please # to comment.