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

Create an adequately sized J9Heap to store the UpcallThunk #20926

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

babsingh
Copy link
Contributor

Currently, the J9Heap size to store the UpcallThunk is restricted to
the page size. If the thunk is greater than the page size, then the
existing code ends in an infinite loop creating J9Heaps of page size.
The correct sized J9Heap will never be created so the code will never
progress.

To resolve this issue, an adequately sized J9Heap, aligned to the page
size, is created to store the UpcallThunk.

@babsingh babsingh marked this pull request as ready for review January 14, 2025 23:24
@babsingh babsingh requested a review from tajila January 14, 2025 23:32
@babsingh
Copy link
Contributor Author

@tajila Requesting your review.

@@ -27,6 +27,8 @@

extern "C" {

#define ROUND_TO(granularity, number) (((UDATA)(number) + (granularity) - 1) & ~((UDATA)(granularity) - 1))
Copy link
Contributor

Choose a reason for hiding this comment

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

we have a few of these, maybe we can just define one in j9.h and add a c++ version in VMHelpers. Can be done in a separate PR

Copy link
Contributor Author

@babsingh babsingh Jan 15, 2025

Choose a reason for hiding this comment

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

Actually, we can use OMR/Bytes.hpp::align here. Let me update the PR since PR builds haven't been launched yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to use OMR/Bytes.hpp::align.

Currently, the J9Heap size to store the UpcallThunk is restricted to
the page size. If the thunk is greater than the page size, then the
existing code ends in an infinite loop creating J9Heaps of page size.
The correct sized J9Heap will never be created so the code will never
progress.

To resolve this issue, an adequately sized J9Heap, aligned to the page
size, is created to store the UpcallThunk.

Signed-off-by: Babneet Singh <[email protected]>
@tajila
Copy link
Contributor

tajila commented Jan 15, 2025

jenkins test sanity plinux jdk24

@tajila
Copy link
Contributor

tajila commented Jan 15, 2025

jenkins test sanity alinux64 jdk24

@babsingh
Copy link
Contributor Author

The failures seen in the PR builds are unrelated to these changes.

@tajila tajila merged commit 55155f7 into eclipse-openj9:master Jan 16, 2025
4 of 9 checks passed
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.

2 participants