RFR: 8319137: release _object in ObjectMonitor dtor to avoid races [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Mon Nov 20 17:01:22 UTC 2023


On Mon, 20 Nov 2023 16:48:57 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> > > How much of this is a revert of [6402004](https://github.com/openjdk/jdk/commit/6402004852ccc993bb6e879c49fb71e2afdcdfbe)? Should we revert back to that state?
> > 
> > 
> > It's pretty much a revert of that. Now only the deflater thread can call this code so I removed the extra branch in the delete loop.
> 
> Then I believe a cleaner way to do this is to make a clean backout of [JDK-8256302](https://bugs.openjdk.org/browse/JDK-8256302), or am I missing something?
>
So with the current changes this fix is almost a backout except for the extra branch I removed in the loop given that now only the deflater thread can call this, and the fact that the delete loop was factored out into a separate static method. Can't this be considered a backout and rename it as such?

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

PR Comment: https://git.openjdk.org/jdk/pull/16738#issuecomment-1819459799


More information about the hotspot-runtime-dev mailing list