Repository navigation
GH-1385: Match the JNI return type when closing exported C Data - #1390
Open
hutiefang76 wants to merge 2 commits into
Open
hutiefang76 wants to merge 2 commits into
hutiefang76 wants to merge 2 commits into
Conversation
Use CallVoidMethod for PrivateData.close in array/schema and stream release callbacks. Keep cleanup intact and exercise all three exported structures, including close failures and nested retained buffers. Generated-by: DeepSeek V4 Flash and Codex
hutiefang76
requested review from
jbonofre,
laurentgo,
lidavidm and
wgtmac
as code owners
October 24, 2026 09:42
This comment has been minimized.
This comment has been minimized.
lidavidm
reviewed
Oct 24, 2026
Member
There was a problem hiding this comment.
Is all of this really necessary? It's not already tested?
Contributor
Author
There was a problem hiding this comment.
You’re right, the existing tests cover the callbacks needed for this fix. I checked RoundtripTest#testSchema and StreamTest#getSchemaError separately on OpenJ9 with -Xcheck:jni: both abort with the original JNI library and pass with the two-line fix. I’ve removed ReleaseTest; the PR now changes only the two JNI calls. The affected reactor also passes clean verify with the existing 110 C Data tests.
AI-generated response, checked against the executed test results.
Remove the duplicate ReleaseTest suite after confirming the existing schema and stream tests each reproduce the JNI return-type error on OpenJ9 and pass with CallVoidMethod. Generated-by: Codex and DeepSeek V4 Flash
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's Changed
The C Data release callbacks invoke
PrivateData.close()throughCallObjectMethod, although its JNI descriptor is()V. With OpenJ9's JNI checks enabled, releasing an exported array, schema or stream can abort the JVM. UseCallVoidMethodin both callbacks.The existing C Data tests already exercise the affected callbacks, so this PR adds no new test suite.
Validation:
-Xcheck:jni: the existingRoundtripTest#testSchemaandStreamTest#getSchemaErroreach abort withJVMJNCK046Eagainst the unchanged JNI library (exit 87, atreleaseSchemaandreleaseArrayStreamrespectively). Both pass against the fixed library without JNI check errors.clean verifypassed: 110 C Data cases, no failures or skips; vector and memory dependencies passed as well.Closes #1385.
AI-generated PR description. Investigation, implementation and automated review assisted by Codex and DeepSeek.