RFR (S) JDK-8025004: -XX:+CheckUnhandledOops asserts for JDK 8 solaris sparc fastdebug binaries

David Holmes david.holmes at oracle.com
Mon Oct 7 22:55:12 PDT 2013


On 3/10/2013 2:38 AM, Lois Foltan wrote:
>
> Please review the following fix:
>
> Webrev:
>      http://cr.openjdk.java.net/~coleenp/bug_jdk8025004/
>
> Bug: -XX:+CheckUnhandledOops asserts for JDK 8 solaris sparc fastdebug
> binaries
>      https://bugs.openjdk.java.net/browse/JDK-8025004
>
> Summary of fix:
>      This fix is to work around a Solaris Studio C++ 12u1 & 12u3
> compiler bug. Basically in fastdebug builds
>      on Solaris, CHECK_UNHANDLED_OOPs is defined causing an oop to be
> defined as a class instead of a oopDesc *.
>      Code within oops/instanceKlass.cpp defines several stack local
> variables as "volatile oop init_lock". Solaris Studio C++
>      compilers erroneously call the oop's destructor twice for the
> volatile oop upon exit from the code segment

Wow! What does that actually do in this case? I'm surprised this has not 
been seen sooner if it impacts 12u1.

>      within the member functions. Remove the keyword "volatile" from all
> "init_lock" stack local variables defined
>      within oops/instanceKlass.cpp. This bug has been reported to the
> Solaris Studio C++ compiler team.

Changes looks okay to me. One has to hope that we don't some obscure 
compiler reordering without the volatile though. :( I think it's usage 
here was simply being "safe".

David
-----

> Tests:
>      JTREG, vm.quick.testlist on Solaris with -XX:+CheckUnhandledOops
> specified
>
> Thank you, Lois
>
>


More information about the hotspot-runtime-dev mailing list