src/hotspot/share/oops/constantPool.cpp
changeset 59252 623722a6aeb9
parent 59247 56bf71d64d51
child 59292 95b1385dd476
equal deleted inserted replaced
59251:4cbfa5077d68 59252:623722a6aeb9
   806     // If another thread resolved the reference, this is a race condition. This
   806     // If another thread resolved the reference, this is a race condition. This
   807     // thread may have had a security manager or something temporary.
   807     // thread may have had a security manager or something temporary.
   808     // This doesn't deterministically get an error.   So why do we save this?
   808     // This doesn't deterministically get an error.   So why do we save this?
   809     // We save this because jvmti can add classes to the bootclass path after
   809     // We save this because jvmti can add classes to the bootclass path after
   810     // this error, so it needs to get the same error if the error is first.
   810     // this error, so it needs to get the same error if the error is first.
   811     jbyte old_tag = Atomic::cmpxchg((jbyte)error_tag,
   811     jbyte old_tag = Atomic::cmpxchg((jbyte*)this_cp->tag_addr_at(which),
   812                             (jbyte*)this_cp->tag_addr_at(which), (jbyte)tag.value());
   812                                     (jbyte)tag.value(),
       
   813                                     (jbyte)error_tag);
   813     if (old_tag != error_tag && old_tag != tag.value()) {
   814     if (old_tag != error_tag && old_tag != tag.value()) {
   814       // MethodHandles and MethodType doesn't change to resolved version.
   815       // MethodHandles and MethodType doesn't change to resolved version.
   815       assert(this_cp->tag_at(which).is_klass(), "Wrong tag value");
   816       assert(this_cp->tag_at(which).is_klass(), "Wrong tag value");
   816       // Forget the exception and use the resolved class.
   817       // Forget the exception and use the resolved class.
   817       CLEAR_PENDING_EXCEPTION;
   818       CLEAR_PENDING_EXCEPTION;