JNI query in OpenJDK

Andrew Haley aph at redhat.com
Wed Jun 13 14:12:03 UTC 2012


On 06/13/2012 02:15 PM, Joe Osborne wrote:
> 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!

It's the same VM, so I find it hard to understand.  Can you please
send a simple test case?

Andrew.




More information about the discuss mailing list