-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Describe the issue
I encountered an issue while running a simple Java program after compiling it with GraalVM and generating a native image. The original Java file is named Hello.java and contains the following code:
public class Hello {
public static void main(String[] args) {
System.out.println("Hello");
}
}
To compile the code, I used GraalVM, which resulted in the generation of the Hello.class file. Subsequently, I created a native image for this class using the command native-image Hello. However, when attempting to execute the program with the ./hello command, I encountered the following error:
zsh: segmentation fault ./hello
Despite searching for solutions on Stack Overflow, I have been unable to find a suitable resolution.
I even raised the question here on StackOverflow, but got no response.
Steps to reproduce the issue
javac Hello.javanative-image Hello./hello
Describe GraalVM and your environment:
- GraalVM version (latest snapshot builds can be found here), or commit id if built from source: [e.g. EE 19.3, CE 20.0, CE 20.1.0-dev-20200304_0848]
- JDK major version: [e.g.:8]
- OS: MacOS Ventura
- Processor: 2.6 GHz 6-Core Intel Core i7
- Architecture: AMD64
- GraalVM: graalvm-jdk-17.0.7+8.1 (Dowloaded it from https://www.graalvm.org/downloads with Java 17 and macOS(x64))
Below is the output for java -version
java version "17.0.7" 2023-04-18 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 17.0.7+8.1 (build 17.0.7+8-LTS-jvmci-23.0-b12)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 17.0.7+8.1 (build 17.0.7+8-LTS-jvmci-23.0-b12, mixed mode, sharing)