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

Use correct field type when calling GET_INTEGER_VALUE #16572

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

dchopra001
Copy link
Contributor

Signed-off-by: Dhruv Chopra Dhruv.C.Chopra@ibm.com

Signed-off-by: Dhruv Chopra <Dhruv.C.Chopra@ibm.com>
@dchopra001
Copy link
Contributor Author

For some context, a problem occurs when we try to set a custom port for the JITServer to listen on (using the -XX:JITServerPort=<x>). The code to set this option is here:

if (xxJITServerPortArgIndex >= 0)
{
uint32_t port=0;
IDATA ret = GET_INTEGER_VALUE(xxJITServerPortArgIndex, xxJITServerPortOption, port);
if (ret == OPTION_OK)
compInfo->getPersistentInfo()->setJITServerPort(port);
}

GET_INTEGER_VALUE treats port as a UDATA type (which is an 8 byte field). Since the code above treats it as a uint32_t, this exposes a problem in Z (big endian) where we will always read port as 0. Setting the type of port to UDATA resolves this issue.

While we are in the area, we also change other instances where there is a type mismatch when calling GET_INTEGER_VALUE.

@mpirvu mpirvu self-assigned this Jan 18, 2023
@mpirvu mpirvu added comp:jitserver Artifacts related to JIT-as-a-Service project arch:z labels Jan 18, 2023
@mpirvu mpirvu added this to In progress in JIT as a Service via automation Jan 18, 2023
Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

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

LGTM

@mpirvu
Copy link
Contributor

mpirvu commented Jan 18, 2023

jenkins test sanity zlinuxjit jdk17

@mpirvu mpirvu merged commit 0889dcf into eclipse-openj9:master Jan 19, 2023
JIT as a Service automation moved this from In progress to Done Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch:z comp:jitserver Artifacts related to JIT-as-a-Service project
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants