JNI query in OpenJDK

Joe Osborne joe.osborne at swiftkey.net
Wed Jun 13 13:15:59 UTC 2012


Hi all,

I'm trying to track down a wrinkle we've discovered - and so far my
Google-foo hasn't turned up much info.

We've recently switched from using the Sun's JDK to OpenJDK6, and found
something a little troubling when using JNI.

In our native code, we do various forms of memory analysis for debugging,
and somewhat unsurprisingly, this includes overriding the global 'operator
new' set of methods.
However, running with the OpenJDK6 JRE, our methods are never hit. Does the
JVM deliberately redirect these when linking, or is something else going on?

I've reproduced this in a trivial program, which elicits the same behaviour
- it's fine under Sun, but not OpenJDK..

We can't be the first to have stumbled across this, so apologies if this
has already been asked!

Joe



More information about the discuss mailing list