corretto-11
corretto-11 copied to clipboard
8214972: Uses of klass_holder() except GC need to apply GC barriers #3059
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