From d99c8b3507753ebf0615b90de2a01d9ca5ebe392 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Sat, 23 May 2026 17:35:28 +0000 Subject: [PATCH] 8385319: AOT: Missed BAD_ADDRESS_ID spots in JDK-8357175 Co-authored-by: Aleksey Shipilev Reviewed-by: shade --- src/hotspot/share/code/aotCodeCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/code/aotCodeCache.cpp b/src/hotspot/share/code/aotCodeCache.cpp index aec23ded100..4cc91208dcd 100644 --- a/src/hotspot/share/code/aotCodeCache.cpp +++ b/src/hotspot/share/code/aotCodeCache.cpp @@ -1794,7 +1794,7 @@ bool AOTCodeCache::write_asm_remarks(CodeBlob& cb) { } const char* cstr = add_C_string(str); int id = _table->id_for_C_string((address)cstr); - assert(id != -1, "asm remark string '%s' not found in AOTCodeAddressTable", str); + assert(id != BAD_ADDRESS_ID, "asm remark string '%s' not found in AOTCodeAddressTable", str); n = write_bytes(&id, sizeof(int)); if (n != sizeof(int)) { return false; @@ -1836,7 +1836,7 @@ bool AOTCodeCache::write_dbg_strings(CodeBlob& cb) { log_trace(aot, codecache, stubs)("dbg string=%s", str); const char* cstr = add_C_string(str); int id = _table->id_for_C_string((address)cstr); - assert(id != -1, "db string '%s' not found in AOTCodeAddressTable", str); + assert(id != BAD_ADDRESS_ID, "db string '%s' not found in AOTCodeAddressTable", str); uint n = write_bytes(&id, sizeof(int)); if (n != sizeof(int)) { return false;