-
Bug
-
Resolution: Fixed
-
P4
-
11, 12, 13
-
b14
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8227525 | 11.0.6-oracle | Per Liden | P4 | Resolved | Fixed | b01 |
JDK-8232020 | 11.0.6 | Per Liden | P4 | Resolved | Fixed | b01 |
nmethod::make_unloaded() clears the _method member too early, before passing the nmethod to the 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.
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.
- backported by
-
JDK-8227525 nmethod::make_unloaded() clears _method member too early
- Resolved
-
JDK-8232020 nmethod::make_unloaded() clears _method member too early
- Resolved