Mercurial > hg > truffle
diff src/share/vm/utilities/bitMap.cpp @ 17662:695a6aba51c3
8033545: Missing volatile specifier in Bitmap::par_put_range_within_word
Summary: The method Bitmap::par_put_range_within_word reloads the original value during a CAS, which may be optimized away. Instead of reloading, use the value returned by Atomic::cmpxchg_ptr() for further processing.
Reviewed-by: tschatzl, brutisso, tonyp
Contributed-by: Matthias Braun <matthia.braun@sap.com>
author | tschatzl |
---|---|
date | Mon, 10 Feb 2014 10:34:52 +0100 |
parents | 55fb97c4c58d |
children | 8a9bb7821e28 |
line wrap: on
line diff
--- a/src/share/vm/utilities/bitMap.cpp Fri Feb 07 12:51:08 2014 -0800 +++ b/src/share/vm/utilities/bitMap.cpp Mon Feb 10 10:34:52 2014 +0100 @@ -107,7 +107,7 @@ while (true) { intptr_t res = Atomic::cmpxchg_ptr(nw, pw, w); if (res == w) break; - w = *pw; + w = res; nw = value ? (w | ~mr) : (w & mr); } }