Skip to content

Support the variadic function in FFI downcall - #15778

Merged
tajila merged 1 commit into
eclipse-openj9:masterfrom
ChengJin01:support_variadic_args_in_downcall
Sep 21, 2022
Merged

Support the variadic function in FFI downcall#15778
tajila merged 1 commit into
eclipse-openj9:masterfrom
ChengJin01:support_variadic_args_in_downcall

Conversation

@ChengJin01

Copy link
Copy Markdown

The changes aim to support the variadic function with
variadic arguments by setting with ffi_prep_cif_var()
in preparing the ffi specific data for downcall.

Signed-off-by: Cheng Jin jincheng@ca.ibm.com

@ChengJin01

Copy link
Copy Markdown
Author

The fix is to support variadic functions in downcall, which was detected in jtreg tests on JDK17/18/19
at
https://github.com/ibmruntimes/openj9-openjdk-jdk17/blob/openj9/test/jdk/java/foreign/TestVarArgs.java
https://github.com/ibmruntimes/openj9-openjdk-jdk18/blob/openj9/test/jdk/java/foreign/TestVarArgs.java
https://github.com/ibmruntimes/openj9-openjdk-jdk19/blob/openj9/test/jdk/java/foreign/TestVarArgs.java

There is no change required in JDK18/19+ except a few code in the layout attributes updated in JDK17 at ibmruntimes/openj9-openjdk-jdk17#112.

@ChengJin01
ChengJin01 force-pushed the support_variadic_args_in_downcall branch from 0a44249 to 9a51841 Compare August 25, 2022 15:43
@ChengJin01

Copy link
Copy Markdown
Author

Reviewer: @tajila
FYI: @gacholio, @pshipton, @DanHeidinga

Comment thread runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp Outdated
@ChengJin01
ChengJin01 force-pushed the support_variadic_args_in_downcall branch from 9a51841 to f7bc3ca Compare August 25, 2022 17:00
@ChengJin01
ChengJin01 force-pushed the support_variadic_args_in_downcall branch from f7bc3ca to b9db1b6 Compare September 2, 2022 18:50
@ChengJin01

Copy link
Copy Markdown
Author

@tajila, any comment on this PR?

@ChengJin01
ChengJin01 force-pushed the support_variadic_args_in_downcall branch from b9db1b6 to c2367b1 Compare September 20, 2022 15:34

@tajila tajila left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just minor comment

The changes aim to support the variadic function with
variadic arguments by setting with ffi_prep_cif_var()
in preparing the ffi specific data for downcall.

Signed-off-by: Cheng Jin <jincheng@ca.ibm.com>
@ChengJin01
ChengJin01 force-pushed the support_variadic_args_in_downcall branch from c2367b1 to 50de744 Compare September 21, 2022 14:52
@tajila

tajila commented Sep 21, 2022

Copy link
Copy Markdown
Contributor

jenkins test sanity win,plinux jdk19

@tajila
tajila merged commit 3df49cb into eclipse-openj9:master Sep 21, 2022
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.

3 participants