Skip to content

cli: Always use musl binary on Linux to fix segfault in prebuilt binary#71

Merged
huacnlee merged 2 commits intomainfrom
copilot/fix-segfault-in-prebuilt-binary
Apr 2, 2026
Merged

cli: Always use musl binary on Linux to fix segfault in prebuilt binary#71
huacnlee merged 2 commits intomainfrom
copilot/fix-segfault-in-prebuilt-binary

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

The prebuilt Linux binary is glibc-linked and compiled against the CI runner's glibc version. On systems with a different glibc it crashes with SIGSEGV. The musl binary is fully statically linked and works on any Linux system.

Changes

  • install: Remove ldd-based musl detection. Always use the -musl artifact on Linux.

    # Before: only used musl binary on musl hosts
    if ldd --version 2>&1 | grep -q 'musl'; then libc='-musl'; fi
    
    # After: always use statically-linked musl binary on Linux
    if [ "$platform" = "linux" ]; then libc='-musl'; fi
  • release.yml:

    • Replace deprecated/archived actions-rs/cargo@v1 with direct cargo build / cross build commands.
    • Add explicit cross: true/false per matrix target. x86_64-unknown-linux-musl now compiles natively with musl-tools (no Docker); aarch64 targets continue to use cross.
  • test-install.yml:

    • Add linux-musl-on-glibc job: runs sh install on an Ubuntu (glibc) runner and verifies the binary executes — exactly the scenario from the reported segfault.
    • Add the workflow file itself to trigger paths.
    • Add top-level permissions: contents: read.

Copilot AI changed the title [WIP] Fix segfault in v0.13.0 prebuilt binary on Linux cli: Always use musl binary on Linux to fix segfault in prebuilt binary Apr 2, 2026
Copilot AI requested a review from huacnlee April 2, 2026 05:41
@huacnlee huacnlee marked this pull request as ready for review April 2, 2026 05:43
@huacnlee huacnlee merged commit 6cf9368 into main Apr 2, 2026
5 checks passed
@huacnlee huacnlee deleted the copilot/fix-segfault-in-prebuilt-binary branch April 2, 2026 05:43
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.

Segfault on v0.13.0 prebuilt binary (Linux 6.17, glibc 2.39, x86_64)

2 participants