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

[23.0] Backport: Throw exception for null pointers passed to RuntimeJNIAccess / RuntimeReflection register methods #639

Merged
merged 5 commits into from
Dec 18, 2023

Conversation

zakkak
Copy link
Collaborator

@zakkak zakkak commented Dec 18, 2023

Closes #604

zakkak and others added 4 commits December 18, 2023 13:42
Don't allow null values to be passed to the `register` method of
`RuntimeJNIAccess` and `RuntimeReflection`. Since these are public APIs
GraalVM should either handle null values (by ignoring them in this case)
or throw a `NullPointerException` before creating an asynchronous task
to perform the registration in the analysis, which then results in
`NullPointerException`s being thrown later when it's no longer possible
to understand where the null value originate from.

(cherry picked from commit e6c12dd)
(cherry picked from commit d621dbd)
Not before the register methods, which can miss cases, nor later on in a runnable.

(cherry picked from commit f94551a)
@zakkak zakkak added this to the 23.0.3.0-Final milestone Dec 18, 2023
@zakkak zakkak requested a review from jerboaa December 18, 2023 11:45
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 18, 2023
@jerboaa
Copy link
Collaborator

jerboaa commented Dec 18, 2023

@zakkak CI failures all likely fixed by #641

Could you please review and re-run with that included?

@zakkak zakkak force-pushed the 2023-12-18-23.0-jan-cpu-backports branch from 4104ef1 to da31858 Compare December 18, 2023 13:47
Copy link
Collaborator

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

LGTM

@jerboaa
Copy link
Collaborator

jerboaa commented Dec 18, 2023

Q IT Data1 failure seems infra related.

@zakkak zakkak merged commit 3619545 into graalvm:mandrel/23.0 Dec 18, 2023
67 checks passed
@zakkak zakkak deleted the 2023-12-18-23.0-jan-cpu-backports branch December 18, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/23.0 backport OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
3 participants