RFR: 8221456: nmethod::make_unloaded() clears _method member too early
Per Liden
per.liden at oracle.com
Wed Mar 27 11:09:11 UTC 2019
Thanks for reviewing, Tobias!
/Per
On 2019-03-27 11:58, Tobias Hartmann wrote:
> Hi Per,
>
> this looks good to me.
>
> Best regards,
> Tobias
>
> On 26.03.19 08:24, Per Liden wrote:
>> nmethod::make_unloaded() clears the _method member too early, before passing the nmethod to
>> CollectedHeap::unregister_nmethod(). This is not what happens when an nmethod is unregistered via
>> nmethod::make_not_entrant_or_zombie(). We should align this behavior. Clearing the _method member
>> after it has been unregistered is useful, since the GC can then print the method name/signature in
>> logs, etc. Moving the clearing of _method until after CollectedHeap::unregister_nmethod() should be
>> a safe and uncontroversial thing to do.
>>
>> Today, ZGC can crash if -Xlog:gc+nmethod=debug is used and an nmethod is unloaded via
>> nmethod::make_unloaded(), because it tries to log the name of the method.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8221456
>> Webrev: http://cr.openjdk.java.net/~pliden/8221456/webrev.0
>>
>> /Per
More information about the hotspot-compiler-dev
mailing list