RFR: 8339159: api/java_rmi/Naming/Rebind.html crashes with SEGV from UTF8::quoted_ascii_length call [v2]

Ioi Lam iklam at openjdk.org
Wed Sep 11 07:00:06 UTC 2024


On Wed, 11 Sep 2024 06:45:37 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
>
> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Simplified approach based on @iklam's suggestion

src/hotspot/share/classfile/symbolTable.cpp line 178:

> 176:       if (!SymbolTable::arena()->Afree(memory, alloc_size)) {
> 177:         // Can't print the now free'd symbol's value, but we just printed it above.
> 178:         NOT_PRODUCT(log_trace(symboltable)(" - Leaked permanent symbol");)

I think the comment may cause more confusion than its worth (the symbol hasn't been  "freed", or else there wouldn't be a leak). It's better to remove the comment.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20865#discussion_r1753291793


More information about the hotspot-runtime-dev mailing list