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

Fix extensionClassLoader initialization on VM snapshot restore runs #20861

Closed
ThanHenderson opened this issue Dec 19, 2024 · 0 comments · Fixed by #20862
Closed

Fix extensionClassLoader initialization on VM snapshot restore runs #20861

ThanHenderson opened this issue Dec 19, 2024 · 0 comments · Fixed by #20862
Assignees
Labels

Comments

@ThanHenderson
Copy link
Contributor

Paths through BytecodeInterpreter.cpp and FastJNI_com_ibm_oti_vm_VM.cpp do not properly restore the extensionClassLoader on restore runs when VM snapshotting is enabled. This has unwanted downstream consequences, e.g. causing failures during GC marking (assertion failures, unexpected null references).

Rather than allocating a new class loader through these paths, the persisted class loader should be initialized with initializeSnapshotClassLoaderObject.

@ThanHenderson ThanHenderson self-assigned this Dec 19, 2024
ThanHenderson added a commit to ThanHenderson/openj9 that referenced this issue Dec 19, 2024
This patch properly initializes the extensionClassLoader on
restore runs through the paths in BytecodeInterpreter.hpp and
FastJNI_com_ibm_oti_vm_VM.cpp rather than, incorrectly, allocating
a new class loader.

Fixes: eclipse-openj9#20861
Signed-off-by: Nathan Henderson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant