RFR: 8280555: serviceability/sa/TestObjectMonitorIterate.java is failing due to ObjectMonitor referencing a null Object

Serguei Spitsyn sspitsyn at openjdk.java.net
Wed Jan 26 22:59:29 UTC 2022


On Wed, 26 Jan 2022 20:15:59 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> This test is failing in the loom repo when using -Xcomp. The reason is because loom introduced doing a full GC in the codecache sweeper, which causes some of the Objects referenced by ObjectMonitors to be GC'd. The fix is to check for the null Objects so we don't get an NPE.
> 
> I'm choosing to fix this in the jdk repo rather than the loom repo since it is a latent bug that theoretically could occur even without the loom changes, and also to help reduce the amount of changes to be reviewed when loom is integrated into jdk.

This workaround looks good to me.
Thanks,
Serguei

-------------

Marked as reviewed by sspitsyn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7238


More information about the serviceability-dev mailing list