RFR: 8339159: api/java_rmi/Naming/Rebind.html crashes with SEGV from UTF8::quoted_ascii_length call
David Holmes
dholmes at openjdk.org
Thu Sep 5 12:12:49 UTC 2024
On Thu, 5 Sep 2024 05:44:47 GMT, David Holmes <dholmes at openjdk.org> wrote:
> This is a long standing bug in the symboltable=trace logging code that we just discovered because we enabled trace logging in some of our testing. The logging code is passed a Symbol that we apparently couldn't fast-free from the resource area, but in a debug build the Symbol has already been zapped and so can't be printed.
>
> Testing
> - internal testing of the code that demonstrated the failure (but it is intermittent)
> - tiers 1-3 sanity
>
> Thanks
src/hotspot/share/classfile/symbolTable.cpp line 181:
> 179: NOT_PRODUCT(sym = ZapResourceArea ? nullptr : &value;)
> 180: if (!SymbolTable::arena()->Afree(memory, alloc_size)) {
> 181: log_trace_symboltable_helper(sym, "Leaked permanent symbol");
Thinking more about this I'm not sure the log message is really appropriate. IIUC we haven't "leaked" anything, we just can't fast-free it. I'm not sure what the true/false return from `Afree` is really meant to signify. No other callers of `Afree` even check the return value!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20865#discussion_r1745343797
More information about the hotspot-runtime-dev
mailing list