Skip to content

fix(native-image): add support for --strict-image-heap #1159

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

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

kkriske
Copy link
Contributor

@kkriske kkriske commented Aug 16, 2024

GraalVM for JDK 22 (release notes) enables the --strict-image-heap option by default, which requires all objects stored in the native-image heap to be marked as build-time initialized.

Issue can be reproduced on GraalVM for JDK 21 by adding --strict-image-heap as native-image cli argument. This is however not a future-proof testing setup as the option will be removed in a future GraalVM release. As form of validation, GraalVM for JDK 22 was added to the test suite.

Proof this does fix the issue:

  • First commit adds GraalVM for JDK 22 to the test suite, which fails the suite on the reported --initialize-at-build-time=org.sqlite.util.ProcessRunner error.
  • Second commit restores the CI to green.

fixes #1158

@kkriske kkriske force-pushed the support-strict-image-heap branch from d555727 to d1ec6ab Compare August 16, 2024 12:16
@gotson
Copy link
Collaborator

gotson commented Aug 19, 2024

Thanks a lot, as always!

@gotson gotson merged commit 029a35f into xerial:master Aug 19, 2024
31 checks passed
@kkriske kkriske deleted the support-strict-image-heap branch August 26, 2024 22:44
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.

GraalVM: 'org.sqlite.util.ProcessRunner' was found in the image heap.
2 participants