race in java.lang.reflect.Field could make UnsafeStaticFieldAccessorImpl#base seen as null

Peter Levart peter.levart at gmail.com
Wed Nov 28 22:12:11 UTC 2012

Ok, here it is:


All fields in FieldAccessor implementations should be final because 
instances can be obtained via a data race in java.lang.reflect.Field.

Regards, Peter

On 11/28/2012 08:10 PM, Aleksey Shipilev wrote:
> On 11/28/2012 05:17 PM, Peter Levart wrote:
>> The fix is simple - transform the field to final - it is only
>> initialized in the constructor.
> I agree with this conclusion. UnsafeStaticFieldAccessorImpl.base should
> be final. Peter, will you be able to prepare the webrev?
> -Aleksey.

More information about the core-libs-dev mailing list