Skip to content

8214972: Uses of klass_holder() except GC need to apply GC barriers #3059 #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

fandreuz
Copy link

@fandreuz fandreuz commented Jul 18, 2025

Description

I've been working on a backport to fix JDK-8339725. The fix in openjdk/jdk#20907 is not enough to fix the problem on jdk11.

The missing backport is JDK-8214972, which I apply in this PR. JDK-8210321 is also needed for ClassLoaderData::holder_no_keepalive.

Related issues

async-profiler/async-profiler#974

Motivation and context

JDK-8339725 affects users of Async-Profiler, and the backports in this PR are a prerequisite for the fix to be fully effective. I'm going to open a new PR to complete the fix if this one is accepted.

I proposed this PR in openjdk/jdk11u-dev#3059, but it was rejected.

How has this been tested?

tier1 and tier2 tests completed successfully.

Platform information

Tested on Amazon Linux 2.

Additional context

n/a

@fandreuz fandreuz force-pushed the JDK-8210321-JDK-8214972 branch from 21ecb72 to 8bcb6d6 Compare July 18, 2025 13:04
Fix klass_holder() and make all callers use it, remove holder_phantom().
@fandreuz fandreuz force-pushed the JDK-8210321-JDK-8214972 branch from 8bcb6d6 to 51e2267 Compare July 18, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant