[jdk17u-dev] RFR: 8298061: vmTestbase/nsk/sysdict/vm/stress/btree/btree012/btree012.java failed with "fatal error: refcount has gone to zero"

Dmitry Chuyko dchuyko at openjdk.org
Mon Mar 24 18:51:10 UTC 2025


On Thu, 20 Mar 2025 17:27:36 GMT, Dmitry Chuyko <dchuyko at openjdk.org> wrote:

>> src/hotspot/share/classfile/placeholders.hpp line 145:
>> 
>>> 143:   Symbol*            supername()           const { return _supername; }
>>> 144:   void               set_supername(Symbol* supername) {
>>> 145:     if (supername != _supername) {
>> 
>> Why isn't there an if (_supername == NULL) _supername->decrement_refcount(); before assigning the new supername?
>
> Did you mean `if (_supername != NULL)`?
> Later versions call `Symbol::maybe_decrement_refcount(_supername);` that acts like `if (s != nullptr) s->decrement_refcount();`.

Also it turns out that checking for NULL may be not enough. PlaceholderEntry has no constructor, so members can contain garbage.

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

PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/3328#discussion_r2010749943


More information about the jdk-updates-dev mailing list