sdkman / sdkman-cli

The SDKMAN! Command Line Interface
https://sdkman.io
Apache License 2.0
6.08k stars 629 forks source link

Bug: oracle graalvm native-image produces broken binary #1217

Closed tsabirgaliev closed 1 year ago

tsabirgaliev commented 1 year ago

Bug report

Oracle GraalVM 17 and 20 native image produces broken binary on MacOS

To reproduce

❯ sdk current java; native-image --version

Using java version 20.0.1-graal
native-image 20.0.1 2023-04-18
GraalVM Runtime Environment Oracle GraalVM 20.0.1+9.1 (build 20.0.1+9-jvmci-23.0-b12)
Substrate VM Oracle GraalVM 20.0.1+9.1 (build 20.0.1+9, serial gc, compressed references)

❯ javac HelloWorld.java && native-image --silent HelloWorld

❯ ./helloworld
fish: Job 1, './helloworld' terminated by signal SIGSEGV (Address boundary error)

System info

❯ uname -a
Darwin Tairs-MacBook-Pro.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64 x86_64

❯ fish --version
fish, version 3.6.1

❯ sdk version

SDKMAN!
script: 5.18.2
native: 0.1.3
marc0der commented 1 year ago

Hi @tsabirgaliev, to me this sounds like a GraalVM bug and nothing to do with SDKMAN. We merely download the SDK onto your machine for your given architecture, but that's where our involvement ends. Feel free to report this to the Oracle GraalVM team.

tsabirgaliev commented 1 year ago

yes, the upstream issue is here: https://github.com/oracle/graal/issues/5778