Request for reviews (M): 7009756: volatile variables could be broken throw reflection API

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Jan 3 23:04:37 PST 2011


Thank you, Igor

I will update the comment.

Thanks,
Vladimir

On 1/3/11 6:51 PM, Igor Veresov wrote:
> 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