Bogus call to frame constructor in os_linux_x86.cpp

David Holmes david.holmes at oracle.com
Mon Nov 5 00:06:47 PST 2012


Hi Jeremy,

On 3/11/2012 4:44 AM, Jeremy Manson wrote:
> Hi folks,
>
> We're playing with JNI code without frame pointers, and we've come
> across an interesting call to the frame constructor.  Line 193 of this file:
>
> http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/4d37eb50b9b1/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
>
> Calls the constructor here:
>
> http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/4d37eb50b9b1/src/cpu/x86/vm/frame_x86.inline.hpp
>
> which triggers the assert on line 46 in a very straightforward way.
>   That seems bogus.
>
> For our tinkering, we have a workaround that avoids having
> os::is_first_C_frame() fail in the first place, but surely this call
> shouldn't happen?  Or the assert should be taken out?

Obviously the call doesn't happen very often, particularly not in debug 
builds. :) I think this is just an oversight and the frame() constructor 
should be being called here. The change history is a bit puzzling - 
AFAICS the call to the constructor was added in 2003 but the constructor 
itself didn't appear until 2006. Something not right there :)

David


More information about the hotspot-runtime-dev mailing list