RFR: 8358330: AsmRemarks and DbgStrings clear() method may not get called before their destructor

Vladimir Kozlov kvn at openjdk.org
Tue Jun 3 01:31:56 UTC 2025


On Mon, 2 Jun 2025 18:32:12 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

> This patch fixes a possible assert in debug builds if the allocation of memory for a CodeBlob fails when loading it from the AOT Code Cache. See description of [JDK-8358330](https://bugs.openjdk.org/browse/JDK-8358330) for more details.

I am not comfortable that you are changing code not used by AOT.
Can you consider populate `CodeBlob::_asm_remarks` and `_dbg_strings` after calling `CodeBlob::create()`? Then you don't need temporary `AsmRemarks` and `DbgStrings`.

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

PR Review: https://git.openjdk.org/jdk/pull/25598#pullrequestreview-2890312467


More information about the hotspot-compiler-dev mailing list