RFR: 8374448: SIGSEGV in ConstantPool::print_value_on with -XX:CompileCommand=print

Johan Sjölen jsjolen at openjdk.org
Thu Feb 12 14:21:58 UTC 2026


On Tue, 10 Feb 2026 18:07:46 GMT, Kerem Kat <krk at openjdk.org> wrote:

>> `BSMAttributeEntries::is_empty()` used AND, so `!is_empty()` was true when only one of `_offsets`/`_bootstrap_methods` was non-null. Callers then dereferenced the null pointer.
>> 
>> Changed to OR so `!is_empty()` guarantees both are non-null. Added asserts at the two assignment sites to check for consistency.
>> 
>> Please note that I could not reproduce this in fastdebug or slowdebug builds on x86_64 Linux.
>
> Thanks for the comments, still cannot repro, applied the `array_length` fix.

@krk , I think that the correct thing to do is to close this issue as "Not an Issue" and open a new ticket as an enhancement with your changes. We can wait a few days before closing to give Jatin a chance to confirm that this is indeed because of an old and unsupported compiler. Would you like to open a new ticket in JBS for your enhancement and ping me so that I can review it for you?

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

PR Comment: https://git.openjdk.org/jdk/pull/29611#issuecomment-3891225174


More information about the hotspot-dev mailing list