-
Notifications
You must be signed in to change notification settings - Fork 733
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
jdk24 java/foreign/largestub/TestLargeStub IllegalArgumentException array length is not legal for long[] or double[] #20355
Comments
Issue Number: 20355 |
@babsingh Please take a look |
The test was modified. It added checks for
While creating the MH for the Downcall, the arguments are transformed to openj9/jcl/src/java.base/share/classes/openj9/internal/foreign/abi/InternalDowncallHandler.java Lines 630 to 643 in d471e57
|
The current downcall mechanism is quite general as that was the simplest way to implement it for all possible types. We pass the args via JNI so we need to use an array to capture the args or else we need infinite natives for the infinite combinations of params. We had to convert the params to long because its the largest common type for all primitives. |
We could modify
To something our JVM can handle |
Sounds good, I will modify the test. |
Related: eclipse-openj9/openj9#20355 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9/openj9#20355 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9/openj9#20355 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9/openj9#20355 Signed-off-by: Babneet Singh <[email protected]>
Opened the below PRs to address the reported issue: |
Our mapping from multiple parameters to a single (or a small number of) arrays should allow for more parameters, not less. What am I missing? |
MethodHandle.asCollector enforces the following rule from JVM Spec 4.3.3 - Method Descriptors: Since we are converting the arguments to an array of |
Closing since the PRs in #20355 (comment) have been merged. |
https://openj9-jenkins.osuosl.org/job/Test_openjdknext_j9_sanity.openjdk_aarch64_mac_Personal_testList_1/6
jdk_foreign_1
java/foreign/largestub/TestLargeStub.java
The text was updated successfully, but these errors were encountered: