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

[FFI] Remove the restriction on all sessions in downcall #16663

Conversation

ChengJin01
Copy link

The changes remove the restriction for any session regardless of the session's type
to ensure the memory of upcall stub is kept alive during the downcall.

Fixes: #16606

Signed-off-by: ChengJin01 jincheng@ca.ibm.com

The changes remove the restriction for any session regardless
of the session's type to ensure the memory of upcall stub
is kept alive during the downcall.

Fixes: eclipse-openj9#16606

Signed-off-by: ChengJin01 <jincheng@ca.ibm.com>
@ChengJin01
Copy link
Author

As explained at #16606 (comment), we remove the restriction on the shared session (including implicit/global sessions) by checking its onwer thread (which is null for any shared session which is shared by threads) to ensure any allocated region (including the memory allocated for the upcall stub) is kept alive during the downcall.

@ChengJin01
Copy link
Author

The changes are verified in OpenJ9 test suites and internal Grinders in JDK17 & 19.

Reviewer: @tajila
FYI: @pshipton

@ChengJin01 ChengJin01 requested a review from tajila February 3, 2023 04:50
@ChengJin01 ChengJin01 added comp:vm project:panama Used to track Project Panama related work labels Feb 3, 2023
@tajila
Copy link
Contributor

tajila commented Feb 3, 2023

jenkins test sanity plinux jdk19

@tajila tajila merged commit 4701ec8 into eclipse-openj9:master Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm project:panama Used to track Project Panama related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jdk19 openjdk java/foreign/SafeFunctionAccessTest.java crash vmState=0x00000000
2 participants