race in java.lang.reflect.Field could make UnsafeStaticFieldAccessorImpl#base seen as null (original) (raw)
Peter Levart peter.levart at gmail.com
Wed Nov 28 22:12:11 UTC 2012
- Previous message: race in java.lang.reflect.Field could make UnsafeStaticFieldAccessorImpl#base seen as null
- Next message: hg: jdk8/tl/jdk: 8004019: Removes unused method HandshakeHash.setCertificateVerifyAlg()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ok, here it is:
http://dl.dropbox.com/u/101777488/jdk8-hacks/UnsafeStaticFieldAccessorImpl.base/webrev/index.html
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.
- Previous message: race in java.lang.reflect.Field could make UnsafeStaticFieldAccessorImpl#base seen as null
- Next message: hg: jdk8/tl/jdk: 8004019: Removes unused method HandshakeHash.setCertificateVerifyAlg()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]