On Mon, 27 Oct 2025 19:48:10 GMT, Chad Rakoczy <[email protected]> wrote:

> [JDK-8370527](https://bugs.openjdk.org/browse/JDK-8370527)
> 
> [JDK-8316694](https://bugs.openjdk.org/browse/JDK-8316694) introduced an 
> `immutable_data_references_counter` which keeps track of the number of 
> nmethods using the immutable data so it can be shared between relocated 
> nmethods. The old code reads the counter, decrements the counter, and then 
> checks the first read to see if it is zero. Since the check is performed on 
> the initial read it will never be zero which causes immutable data to never 
> be freed.

This pull request has now been integrated.

Changeset: 8236800d
Author:    Chad Rakoczy <[email protected]>
Committer: Vladimir Kozlov <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/8236800deb5b99a027b0944f6c512c0f31d030df
Stats:     106 lines in 4 files changed: 30 ins; 7 del; 69 mod

8370527: Memory leak after 8316694: Implement relocation of nmethod within 
CodeCache

Reviewed-by: shade, eastigeevich, kvn

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

PR: https://git.openjdk.org/jdk/pull/28008

Reply via email to