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

David Holmes dholmes at openjdk.org
Mon Feb 9 21:59:37 UTC 2026


On Fri, 6 Feb 2026 16:00:55 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.

I am a bit dubious about this change. We assert the two fields must both be null but have changed is_empty to allow for them not both being null. We need to understand how the failure can arise and prevent it, not accommodate it IMO.

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

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


More information about the hotspot-dev mailing list