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

NullRestricted: putstatic and putfield throw NPE on null assignment #18028

Merged
merged 1 commit into from Aug 29, 2023

Conversation

theresa-m
Copy link
Contributor

@theresa-m theresa-m commented Aug 28, 2023

  • putstatic and putfield throw NullPointerException if a field is being set to null that has a NullRestricted attribute
  • tests for putfield and putstatic

Related: #17340

@theresa-m theresa-m force-pushed the nr_verification_2 branch 2 times, most recently from e652b15 to 0b5d314 Compare August 28, 2023 17:06
@hangshao0 hangshao0 added project:valhalla Used to track Project Valhalla related work comp:vm comp:test labels Aug 28, 2023
runtime/oti/j9javaaccessflags.h Show resolved Hide resolved
runtime/vm/resolvesupport.cpp Outdated Show resolved Hide resolved
runtime/vm/BytecodeInterpreter.hpp Outdated Show resolved Hide resolved
@theresa-m
Copy link
Contributor Author

Thanks for the review @hangshao0. This is ready for another look.

- putstatic and putfield throw NullPointerException if a field is being set to null that has a NullRestricted attribute
- tests for putfield and putstatic

Signed-off-by: Theresa Mammarella <Theresa.T.Mammarella@ibm.com>
@hangshao0
Copy link
Contributor

Jenkins test sanity,extended winval jdknext

@hangshao0
Copy link
Contributor

The failure on Windows build is not related to this change,

@hangshao0
Copy link
Contributor

Jenkins test sanity,extended xlinuxval jdknext

@hangshao0
Copy link
Contributor

The withfield instruction also throws a NPE if null is attempted to store to a null-restricted field. I expect this change will be added in a following PR.

@hangshao0 hangshao0 merged commit 3907198 into eclipse-openj9:master Aug 29, 2023
6 of 7 checks passed
@hangshao0
Copy link
Contributor

FYI @a7ehuo This is the VM PR for NPE on putstatic/putfield on NullRestricted field.

@theresa-m theresa-m deleted the nr_verification_2 branch December 6, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:test comp:vm project:valhalla Used to track Project Valhalla related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants