JNI query in OpenJDK
david.holmes at oracle.com
Wed Jun 13 19:39:53 PDT 2012
I'm moving this discussion to hotspot-runtime-dev. Please follow up
there and not on the discuss list.
On 14/06/2012 12:12 AM, Andrew Haley wrote:
> 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?
More information about the hotspot-runtime-dev