1.1 --- a/src/share/vm/opto/graphKit.cpp Thu May 27 13:09:56 2010 -0700 1.2 +++ b/src/share/vm/opto/graphKit.cpp Mon Jun 07 17:46:04 2010 -0700 1.3 @@ -3487,7 +3487,6 @@ 1.4 1.5 Node* tls = __ thread(); // ThreadLocalStorage 1.6 1.7 - Node* no_ctrl = NULL; 1.8 Node* no_base = __ top(); 1.9 float likely = PROB_LIKELY(0.999); 1.10 float unlikely = PROB_UNLIKELY(0.999); 1.11 @@ -3511,10 +3510,10 @@ 1.12 Node* index_adr = __ AddP(no_base, tls, __ ConX(index_offset)); 1.13 1.14 // Now some values 1.15 - 1.16 - Node* index = __ load(no_ctrl, index_adr, TypeInt::INT, T_INT, Compile::AliasIdxRaw); 1.17 - Node* buffer = __ load(no_ctrl, buffer_adr, TypeRawPtr::NOTNULL, T_ADDRESS, Compile::AliasIdxRaw); 1.18 - 1.19 + // Use ctrl to avoid hoisting these values past a safepoint, which could 1.20 + // potentially reset these fields in the JavaThread. 1.21 + Node* index = __ load(__ ctrl(), index_adr, TypeInt::INT, T_INT, Compile::AliasIdxRaw); 1.22 + Node* buffer = __ load(__ ctrl(), buffer_adr, TypeRawPtr::NOTNULL, T_ADDRESS, Compile::AliasIdxRaw); 1.23 1.24 // Convert the store obj pointer to an int prior to doing math on it 1.25 // Must use ctrl to prevent "integerized oop" existing across safepoint