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]Fix the issue with addVarg/nextVarg of VaList on Power #514

Conversation

ChengJin01
Copy link

The change is to resolve the Jtreg test related issue with addVarg/nextVarg of VaList on Power to ensure the struct value is correctly read from va_list and added to va_list when the struct argument size is inconsistent with its layout size.

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

@ChengJin01
Copy link
Author

The code is the same as ibmruntimes/openj9-openjdk-jdk19#42.

Reviewer: @tajila
FYI: @pshipton

@ChengJin01 ChengJin01 force-pushed the jep424_fix_valist_struct_jtreg_tests_jdknext branch from 0238811 to 3c78478 Compare October 21, 2022 18:52
Cheng Jin added 2 commits October 25, 2022 16:08
The change is to resolve the Jtreg test related issue
with addVarg/nextVarg of VaList on Power to ensure the
struct value is correctly read from va_list and added
to va_list when the struct argument size is inconsistent
with its layout size.

Signed-off-by: Cheng Jin <jincheng@ca.ibm.com>
The change is to resolve the Jtreg test related issue
with addVarg/nextVarg of VaList on Power to ensure the
struct value is correctly read from va_list and added
to va_list when the struct argument size is inconsistent
with its layout size.

Signed-off-by: Cheng Jin <jincheng@ca.ibm.com>
@ChengJin01 ChengJin01 force-pushed the jep424_fix_valist_struct_jtreg_tests_jdknext branch from 3c78478 to 7771470 Compare October 25, 2022 20:09
@tajila
Copy link
Member

tajila commented Oct 26, 2022

jenkins test sanity plinux jdknext

@tajila tajila merged commit 0e8e8e6 into ibmruntimes:openj9 Nov 3, 2022
Comment on lines +164 to +165
return (structSegment.byteSize() > structArgLayout.byteSize()) ?
structArgLayout.byteSize() : structSegment.byteSize();
Copy link
Member

Choose a reason for hiding this comment

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

Am I missing something or could this just be this?

    return Math.min(structSegment.byteSize(), structArgLayout.byteSize());

Copy link
Author

@ChengJin01 ChengJin01 Nov 3, 2022

Choose a reason for hiding this comment

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

We expect to get the smaller size suitable for the struct to allocate, in such case Math.min() should work. I will create a PR for this minor adjustment.

Copy link
Author

Choose a reason for hiding this comment

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

PRs are created at #521 and ibmruntimes/openj9-openjdk-jdk19#49.

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