I have a Java application that calls many different native methods of an obsolete application through JNI. But the JVM crashes with a dump of the stack at random places, outside of any JNI call. Sometimes it crashes during GC, sometimes during class loading and in other places. I suspect that one or more of my own methods decompose a bunch of JVMs or some other data structure. I need to know what challenge this is, so I can fix my own implementation.
The legacy application is a third-party DLL for which I have no sources or symbol information. To make it callable with Java, I built a DLL wrapper using JNI calling conventions.
The ideal solution is an advanced JVM option that forces the JVM to automatically check the integrity of the heap and other data structures after each JNI call.
Do you know something that might help?
PS Please do not tell me to create a socket or tube layer between the JVM and the legacy application, because our requirements prohibit this. This is about error detection, not architecture.
source
share