RFR (XS): 8203262: Incorrect cmpxchg usage in MetaspaceGC::inc_capacity_until_GC
thomas.schatzl at oracle.com
Sun May 20 08:04:36 UTC 2018
can I have reviews for this small change that removes a faulty reload
of the expected value for some atomic cmpxchg use?
I.e. the code is like this:
old = _value;
new = old + ...
... = Atomic::cmpxchg(new, &_value, _value);
It is generally wrong to reload _value as expected value in the cmpxchg
because it might have changed between the its initial load and the use
This defect has been found by code inspection, there has been no issue
reported because of this.
More information about the hotspot-gc-dev