Mercurial > hg > truffle
changeset 14352:3dc1055f4e87
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 | Thu, 06 Feb 2014 17:12:10 +0100 |
parents | 2cff20331ca2 |
children | 7c41aaa3929b |
files | src/share/vm/utilities/bitMap.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/utilities/bitMap.cpp Thu Feb 06 14:12:43 2014 +0100 +++ b/src/share/vm/utilities/bitMap.cpp Thu Feb 06 17:12:10 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); } }