Request for review (S) 7012088: jump to 0 address because of lack of memory ordering in SignatureHandler::add

Coleen Phillimore coleen.phillimore at oracle.com
Tue Feb 1 10:20:02 PST 2011


Dmitry,   You are absolutely right.  We should check _handlers under the 
lock too.  It could be created in a separate thread.

Thanks!
Coleen

On 2/1/2011 1:14 PM, Dmitry Samersoff wrote:
> Coleen,
>
> assert code is not clean for me:
>
> if (_handlers != NULL){
> }
>
> _handlers never checked for NULL before e.g. during printing we
> use _handlers->length() etc.
>
> if we are fighting against race I guess we should take a lock before
> null check.
>
> i.e.
>
> MutexLocker mu(SignatureHandlerLibrary_lock);
> if (_handlers != NULL) {
> ....
>
> -Dmitry
>
>
> On 2011-02-01 19:48, Coleen Phillimore wrote:
>> Summary: Write method signature handler under lock to prevent race with
>> growable array resizing
>>
>> Also includes a fix to 6704010 which was broken with
>> -XX:-UseFastSignatureHandlers
>>
>> This change was submitted and tested by the customer.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/7012088/
>> bug link at http://bugs.sun.com/view_bug.do?bug_id=7012088
>>
>> Thanks,
>> Coleen
>



More information about the hotspot-runtime-dev mailing list