RFR 8146984: SIGBUS: bool Method::has_method_vptr(const void*)+0xc

Daniel D. Daugherty daniel.daugherty at oracle.com
Fri Jan 29 16:02:54 UTC 2016

On 1/29/16 5:46 AM, Coleen Phillimore wrote:
> Summary: Add address check and use SafeFetchN for Method* vptr access 
> when Method* may be bad pointer.
> Tested with RBT and failing test case (reproduced 1 in 100 times) with 
> fatal in the 'return's in the change to verify.
> open webrev at http://cr.openjdk.java.net/~coleenp/8146984/

This one caught my eye because it has to do with sampling...

     The old code checked "!is_metaspace_object()" and used
     has_method_vptr((const void*)this).

     The new code skips the "!is_metaspace_object()" check even after sanity
     checking the pointer, but you don't really explain why that's OK.

     The new code also picks up parts of Method::has_method_vptr() which
     makes me wonder if that's the right place for the fix. Won't other
     callers to Method::has_method_vptr() be subject to the same crashing
     mode? Or was the crashing mode only due to the "!is_metaspace_object()"


> bug link https://bugs.openjdk.java.net/browse/JDK-8146984
> Thanks,
> Coleen

More information about the hotspot-dev mailing list