diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1e5deb5..cf2f054 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,6 +140,8 @@ jobs: ulimit -a chmod +x ./bin/wave ./bin/wave --version + # must start with a virtual memory limit (#46) + for v in 2000000 1000000; do (ulimit -v $v && ./bin/wave --version); done release: name: Release if: "contains(github.event.head_commit.message, '[release]') && github.event.ref=='refs/heads/master'" diff --git a/app/build.gradle b/app/build.gradle index 8481ea4..50851a0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -100,7 +100,10 @@ graalvmNative { configurationFileDirectories.from(file('conf')) if (System.env.getOrDefault("PLATFORM", "") == "linux-x86_64") { - buildArgs(['--static', '--libc=musl', '--gc=G1', '-march=compatibility']) + // Do not use G1: in a static musl image it calls getcpu via the legacy vsyscall page, + // which segfaults on kernels booted with vsyscall=none (e.g. WSL2). See #86. + // Cap the reserved heap address space instead, so it runs under `ulimit -v`. See #46. + buildArgs(['--static', '--libc=musl', '-march=compatibility', '-R:ReservedAddressSpaceSize=512m']) } javaLauncher = javaToolchains.launcherFor {