|
From: Richard Frith-M. <ri...@br...> - 2006-01-16 10:51:27
|
On 16 Jan 2006, at 10:14, David Eriksson wrote: > On Mon, 2006-01-16 at 07:12 +0000, Richard Frith-Macdonald wrote: >> I have a large body of code making complex use of JNI called from >> servlets in tomcat. >> >> Because this uses a lot of JNI, and was developed on the Sun >> implementation of java, I have been unable to find another >> implementation which will run it ... SableVM and Kaffe lack a lot of >> the JNI functions required. >> >> I have infrequent crashes in Java which are almost certainly due to >> errors in the JNI code ... most likely C library code writing to >> memory it shouldn't, and corrupting the Java system ... so valgrind >> seems the only realistic hope to catch that kind of thing. > > Just thinking out loud here... (It was a long time since I did JNI.) > > Would it be possible to create unit tests or similar that exerciced > the > JNI code without any Java involved? Then valgrind could run on the > unit > tests... Thanks for the suggestion, but the code is large,complex and involves callbacks into the java environment from the external libraries. Any non-java unit tests would need to simulate the presence of java and be hugely time consuming to write. It would probably be quicker to re-implement the system entirely in C/Objective-C. |