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

[Jtreg/FFI/0.39] Remove the null segment check for pointer #17414

Conversation

ChengJin01
Copy link
Contributor

The changes remove the check on MemoryAddress.NULL(JDK17)
MemorySegment.NULL(JDK20) for the pointer argument/return
value as this type of segment/address is acceptable in the
native function, depending upon how the segment/address
is used.

Fixes: #17400, #16761

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

The changes aim to address the cases of the invalid passed-in
arguments in downcall and the invalid return value from upcall
by leveraging the exception handling code in upcall.

Fixes: eclipse-openj9#16761

Conflicts:
	runtime/vm/UpcallVMHelpers.cpp

Signed-off-by: ChengJin01 <jincheng@ca.ibm.com>
The changes remove the check on MemoryAddress.NULL(JDK17)
MemorySegment.NULL(JDK20) for the pointer argument/return
value as this type of segment/address is acceptable in the
native function, depending upon how the segment/address
is used.

Fixes: eclipse-openj9#17400, eclipse-openj9#16761

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

ChengJin01 commented May 16, 2023

This PR (verified in JDK17/20) includes the fixes at #17400 and #16761.

@ChengJin01
Copy link
Contributor Author

Reviewer: @tajila
FYI: @pshipton

@ChengJin01 ChengJin01 requested a review from tajila May 16, 2023 17:33
@ChengJin01 ChengJin01 added comp:vm project:panama Used to track Project Panama related work jdk17 jdk20 labels May 16, 2023
@tajila tajila merged commit 8b5fd99 into eclipse-openj9:v0.39.0-release May 16, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm jdk17 jdk20 project:panama Used to track Project Panama related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants