[jdk17u-dev] Integrated: 8268364: jmethod clearing should be done during unloading
Kerem Kat
duke at openjdk.org
Mon Sep 16 16:07:14 UTC 2024
On Mon, 2 Sep 2024 10:31:10 GMT, Kerem Kat <duke at openjdk.org> wrote:
> Clean backport of [8268364](https://bugs.openjdk.org/browse/JDK-8268364).
>
> It fixes crashes when accessing jmethodIDs of a class being unloaded.
>
> Here is the reproducer that crashes JVM in ~1 second without the patch, but works fine with it: [gist](https://gist.github.com/krk/a0800bac5bc5a01709be85637285a965).
>
> This fix also resolves the issue reported at https://github.com/async-profiler/async-profiler/issues/974 for Java 17.
>
> **Additional testing**: release and fastdebug with `JTREG_KEYWORDS="!headful & !external-dep & !printer"`, no new test failures with the patch.
>
> To run the repro:
>
>
> javac Main.java
> gcc -shared -I"$JAVA_HOME/include" -I"$JAVA_HOME/include/linux" -fPIC repro.cpp -orepro.so
>
> java -agentpath:"$(pwd)/repro.so" -Xmx100m Main
This pull request has now been integrated.
Changeset: 35c1ebc7
Author: Kerem Kat <katkerem at amazon.com>
Committer: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.org/jdk17u-dev/commit/35c1ebc76dba1bd6343dbed72ad4ead04a603aed
Stats: 36 lines in 2 files changed: 20 ins; 13 del; 3 mod
8268364: jmethod clearing should be done during unloading
Backport-of: 3d84398d128bb2eed6280ebbc3f57afb3b89908f
-------------
PR: https://git.openjdk.org/jdk17u-dev/pull/2839
More information about the jdk-updates-dev
mailing list