Skip to content
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

Prevent JNI classloader leak #574

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Prevent JNI classloader leak #574

merged 1 commit into from
Sep 5, 2023

Conversation

normanmaurer
Copy link
Member

Motivation:

We should use weak references to hold global references to our own classes as otherwise it will be not possible to unload the classloader.

Modifications:

Use weak references for the classes in JNI.

Result:

Related to netty/netty#13480

Motivation:

We should use weak references to hold global references to our own classes as otherwise it will be not possible to unload the classloader.

Modifications:

Use weak references for the classes in JNI.

Result:

Related to netty/netty#13480
@normanmaurer normanmaurer added this to the 0.0.50.Final milestone Sep 4, 2023
@normanmaurer normanmaurer merged commit 487fcb2 into main Sep 5, 2023
12 checks passed
@normanmaurer normanmaurer deleted the jni_classloader_leak branch September 5, 2023 06:44
@normanmaurer normanmaurer removed this from the 0.0.50.Final milestone Sep 5, 2023
normanmaurer added a commit that referenced this pull request Sep 26, 2023
Motivation:

The code introduced as part of #574 contained a bug which could crash the JVM. This only manifested in JDK21+ as earlier versions did not contain the related assert.

Modifications:

Remove left-over call that could crash the JVM

Result:

Correct code that also works on JDK21
normanmaurer added a commit that referenced this pull request Sep 26, 2023
Motivation:

The code introduced as part of
#574 contained a
bug which could crash the JVM. This only manifested in JDK21+ as earlier
versions did not contain the related assert.

Modifications:

Remove left-over call that could crash the JVM

Result:

Correct code that also works on JDK21
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.

2 participants