Describe the issue
If a class defines their initial value of a static field with the "ConstantValue" attribute, svm evaluates the field to null, if the class get's initialized at runtime. If the class get's initialized at build time, it works fine.
Steps to reproduce the issue
Please include both build steps as well as run steps
- git clone https://github.com/Vukooo/NativeImageFinallyReproducer -b bug-constantvalue
- sh run_not_working.sh // Null will be printed
- sh run_working.sh // "INITIAL-VALUE" will be correctly printed
Describe GraalVM and your environment:
- GraalVM version: GraalVM Runtime Environment GraalVM CE 17.0.7+7.1 (build 17.0.7+7-jvmci-23.0-b12)
- JDK major version: 17
- OS: macOS Ventura
- Architecture: arm64