8025004: -XX:+CheckUnhandledOops asserts for JDK 8 Solaris fastdebug binaries

Thu, 03 Oct 2013 18:50:58 -0400

author
coleenp
date
Thu, 03 Oct 2013 18:50:58 -0400
changeset 5836
3374b92de2d9
parent 5834
faff125a1ead
child 5837
3bf767171ea4

8025004: -XX:+CheckUnhandledOops asserts for JDK 8 Solaris fastdebug binaries
Summary: Remove unnecessary volatile keyword on stack locals within instanceKlass.cpp to work around Solaris Studio C++ compiler issue
Reviewed-by: coleenp, dcubed
Contributed-by: lois.foltan@oracle.com

src/share/vm/oops/instanceKlass.cpp file | annotate | diff | comparison | revisions
src/share/vm/oops/instanceKlass.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/oops/instanceKlass.cpp	Thu Oct 03 12:39:58 2013 +0400
     1.2 +++ b/src/share/vm/oops/instanceKlass.cpp	Thu Oct 03 18:50:58 2013 -0400
     1.3 @@ -456,14 +456,14 @@
     1.4    return java_lang_Class::signers(java_mirror());
     1.5  }
     1.6  
     1.7 -volatile oop InstanceKlass::init_lock() const {
     1.8 +oop InstanceKlass::init_lock() const {
     1.9    // return the init lock from the mirror
    1.10    return java_lang_Class::init_lock(java_mirror());
    1.11  }
    1.12  
    1.13  void InstanceKlass::eager_initialize_impl(instanceKlassHandle this_oop) {
    1.14    EXCEPTION_MARK;
    1.15 -  volatile oop init_lock = this_oop->init_lock();
    1.16 +  oop init_lock = this_oop->init_lock();
    1.17    ObjectLocker ol(init_lock, THREAD);
    1.18  
    1.19    // abort if someone beat us to the initialization
    1.20 @@ -608,7 +608,7 @@
    1.21  
    1.22    // verification & rewriting
    1.23    {
    1.24 -    volatile oop init_lock = this_oop->init_lock();
    1.25 +    oop init_lock = this_oop->init_lock();
    1.26      ObjectLocker ol(init_lock, THREAD);
    1.27      // rewritten will have been set if loader constraint error found
    1.28      // on an earlier link attempt
    1.29 @@ -731,7 +731,7 @@
    1.30    // refer to the JVM book page 47 for description of steps
    1.31    // Step 1
    1.32    {
    1.33 -    volatile oop init_lock = this_oop->init_lock();
    1.34 +    oop init_lock = this_oop->init_lock();
    1.35      ObjectLocker ol(init_lock, THREAD);
    1.36  
    1.37      Thread *self = THREAD; // it's passed the current thread
    1.38 @@ -879,7 +879,7 @@
    1.39  }
    1.40  
    1.41  void InstanceKlass::set_initialization_state_and_notify_impl(instanceKlassHandle this_oop, ClassState state, TRAPS) {
    1.42 -  volatile oop init_lock = this_oop->init_lock();
    1.43 +  oop init_lock = this_oop->init_lock();
    1.44    ObjectLocker ol(init_lock, THREAD);
    1.45    this_oop->set_init_state(state);
    1.46    ol.notify_all(CHECK);
     2.1 --- a/src/share/vm/oops/instanceKlass.hpp	Thu Oct 03 12:39:58 2013 +0400
     2.2 +++ b/src/share/vm/oops/instanceKlass.hpp	Thu Oct 03 18:50:58 2013 -0400
     2.3 @@ -995,7 +995,7 @@
     2.4    // Must be one per class and it has to be a VM internal object so java code
     2.5    // cannot lock it (like the mirror).
     2.6    // It has to be an object not a Mutex because it's held through java calls.
     2.7 -  volatile oop init_lock() const;
     2.8 +  oop init_lock() const;
     2.9  private:
    2.10  
    2.11    // Static methods that are used to implement member methods where an exposed this pointer

mercurial