Request for reviews (M): 7009756: volatile variables could be broken throw reflection API
Igor Veresov
igor.veresov at oracle.com
Mon Jan 3 18:51:44 PST 2011
The comment in unsafe.cpp:259-260 should probably be fixed.
Looks good otherwise.
igor
On 1/3/11 6:28 PM, Vladimir Kozlov wrote:
> http://cr.openjdk.java.net/~kvn/7009756/webrev
>
> Fixed 7009756: volatile variables could be broken throw reflection API
>
> Unsafe_SetLongVolatile() and Unsafe_GetLongVolatile() are not atomic
> on 32 bit x86 (C++ generates two 32 bit loads/stores).
>
> Use Atomic::load() and Atomic::store() to access a volatile long.
>
> Verified with bug's test on all 32 bit platforms. Passed JPRT.
More information about the hotspot-dev
mailing list