ibm jdk - Why NewGlobalRef will core dump on JNI on an IBM JDK? -


i believe have hit bug on ibm jdk on jni implementation.

i'm working on apache activemq artemis , had make this following fix having issues on ibm jdk 1.8:

https://github.com/apache/activemq-artemis/commit/18e41963b61a5ef6dbcdb150e27c07c062deaa66

the issue around acquiring newglobalref on methodid, presumably object well. if acquire newglobalref(methodid) through sun jdk fine, if on ibm jdk, gpf.

i fix artemis native layer removing newglobalref (as believe didn't need in end), still jvm shouldn't core dump because of this.

i have put project replicating issue: https://github.com/clebertsuconic/simple-jni-bug

if revert last commit, or comment code around newglobalref on method id pass.

methodids aren't objects. there no reason globalref them. remove newglobalref call , work fine on both vms.

i don't know why oracle doesn't crash (maybe checking value against heap range?)

are aware of -xcheck:jni option? detect , warn incorrect jni usage.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -