You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backport of 582b943 (openjdk/jdk@582b943). Keeps the superclass name alive while a parallel thread loads the superclass, preventing a refcount underflow.
Adaptation for 17u: Mainline's fix only needed to change systemDictionary.cpp because the placeholder-table supername refcounting was already correct there (introduced by JDK-8292286, Convert PlaceholderTable to ResourceHashtable, which is not in 17u). Rather than backport that structural refactor, this PR open-codes the equivalent behavior on the legacy Hashtable-based PlaceholderTable:
set_supername() now decrements the replaced supername before adopting the new one.
find_and_remove() keeps the supername alive until the whole entry is removed (released by free_entry), instead of clearing it as soon as the super-load
queue empties.
new_entry() initializes _supername to NULL before the first set_supername(), since the legacy table allocates entries as raw, unconstructed memory.
The added gtest declares its symbols as raw Symbol* (not TempNewSymbol) so the TempSymbol cleanup delayer (JDK-8315559) doesn't bump their starting refcount, and releases them manually.
Testing:
gtest:PlaceholderTable passes; full gtest:all (908 tests) passes.
👋 Welcome back xpeng! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
Hi @coleenp, could you review this backport? It fixes the crash in SymbolTable::do_lookup.
It's not a clean backport: the fix landed in JDK 21 on top of JDK-8267935 (https://bugs.openjdk.org/browse/JDK-8267935), which replaced Hashtable with ResourceHashtable. Since that change isn't in JDK 17, I had to adapt both the fix and the test to the older Hashtable-based code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backportPort of a pull request already in a different code baserfrPull request is ready for review
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of 582b943 (openjdk/jdk@582b943). Keeps the superclass name alive while a parallel thread loads the superclass, preventing a refcount underflow.
Adaptation for 17u: Mainline's fix only needed to change systemDictionary.cpp because the placeholder-table supername refcounting was already correct there (introduced by JDK-8292286, Convert PlaceholderTable to ResourceHashtable, which is not in 17u). Rather than backport that structural refactor, this PR open-codes the equivalent behavior on the legacy Hashtable-based PlaceholderTable:
queue empties.
The added gtest declares its symbols as raw Symbol* (not TempNewSymbol) so the TempSymbol cleanup delayer (JDK-8315559) doesn't bump their starting refcount, and releases them manually.
Testing:
Progress
Warning
8278965: crash in SymbolTable::do_lookupIssue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/4544/head:pull/4544$ git checkout pull/4544Update a local copy of the PR:
$ git checkout pull/4544$ git pull https://git.openjdk.org/jdk17u-dev.git pull/4544/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4544View PR using the GUI difftool:
$ git pr show -t 4544Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/4544.diff
Using Webrev
Link to Webrev Comment