Skip to content

[ICE]: SIGSEGV on nightly (macOS) #160038

Description

@kayabaNerve
  rustup +$NIGHTLY_VERSION component add rust-src
  
  if [ "$RUNNER_OS" = "Linux" ]; then
    export CFLAGS=-I/usr/include
  elif [ "$RUNNER_OS" = "Windows" ]; then
    export PATH="$PATH:/C/msys64/clang64/bin"
  fi
  
  cargo +$NIGHTLY_VERSION build --target riscv32imac-unknown-none-elf -Z build-std=core -p serai-no-std-tests
  cargo +$NIGHTLY_VERSION build --target riscv32imac-unknown-none-elf -Z build-std=core,alloc -p serai-no-std-tests --features "alloc"
  shell: /bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    DYLD_LIBRARY_PATH: /opt/homebrew/opt/llvm/lib:
    DOCKER_HOST: unix:///Users/runner/.lima/docker-actions-toolkit/docker.sock
    GITHUB_CI: true
    RUSTFLAGS:  --cfg github_ci
    RUST_BACKTRACE: 1
    NIGHTLY_VERSION: nightly-2026-07-23
info: syncing channel updates for nightly-2026-07-23-aarch64-apple-darwin
info: latest update on 2026-07-23 for version 1.99.0-nightly (6f72b5dd5 2026-07-22)
info: downloading 6 components
info: downloading component rust-src
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/Users/runner/.rustup/toolchains/nightly-2026-07-23-aarch64-apple-darwin/bin/rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg -Wwarnings` (signal: 11, SIGSEGV: invalid memory reference)
  --- stderr
  error: rustc interrupted by SIGSEGV, printing backtrace

  0   librustc_driver-0adc2d977ed6a50d.dy 0x000000010ac5b42c _RNvNtCs6JBDw4KTACC_17rustc_driver_impl14signal_handler17print_stack_trace + 140
  1   libsystem_platform.dylib            0x000000018fc797a4 _sigtramp + 56
  2   librustc_driver-0adc2d977ed6a50d.dy 0x000000010b6afdf4 _RNvCs1YrFTmDuiGk_10rustc_llvm28initialize_available_targets + 112
  3   librustc_driver-0adc2d977ed6a50d.dy 0x000000010a87f4f8 _RNCINvMs0_NtNtCshrkeXHZkvHl_3std4sync4onceNtB8_4Once9call_onceNCNvNtCs2fgtGhgLXJl_18rustc_codegen_llvm9llvm_util4init0E0B14_ + 1080
  4   librustc_driver-0adc2d977ed6a50d.dy 0x000000010d00ec24 _RNvMNtNtNtNtCshrkeXHZkvHl_3std3sys4sync4once5queueNtB2_4Once4call + 256
  5   librustc_driver-0adc2d977ed6a50d.dy 0x000000010a93e340 _RNvXs3_Cs2fgtGhgLXJl_18rustc_codegen_llvmNtB5_18LlvmCodegenBackendNtNtNtCsg25EVR5ydDo_17rustc_codegen_ssa6traits7backend14CodegenBackend4init + 636
  6   librustc_driver-0adc2d977ed6a50d.dy 0x000000010ac44f7c _RNCINvNtCs4KMZOCqkQB3_15rustc_interface9interface12run_compileruNCNvCs6JBDw4KTACC_17rustc_driver_impl12run_compiler0Es0_0B14_ + 864
  7   librustc_driver-0adc2d977ed6a50d.dy 0x000000010ac3c094 _RINvNtNtCshrkeXHZkvHl_3std3sys9backtrace28___rust_begin_short_backtraceNCNCINvNtCs4KMZOCqkQB3_15rustc_interface4util26run_in_thread_with_globalsNCINvB1e_31run_in_thread_pool_with_globalsNCINvNtB1g_9interface12run_compileruNCNvCs6JBDw4KTACC_17rustc_driver_impl12run_compiler0Es0_0uE0uE00uEB3C_ + 304
  8   librustc_driver-0adc2d977ed6a50d.dy 0x000000010ac4a91c _RNSNvYNCINvNtNtCshrkeXHZkvHl_3std6thread9lifecycle15spawn_uncheckedNCNCINvNtCs4KMZOCqkQB3_15rustc_interface4util26run_in_thread_with_globalsNCINvB1a_31run_in_thread_pool_with_globalsNCINvNtB1c_9interface12run_compileruNCNvCs6JBDw4KTACC_17rustc_driver_impl12run_compiler0Es0_0uE0uE00uEs_0INtNtNtCsmpf2o5WY3k_4core3ops8function6FnOnceuE9call_once6vtableB3y_ + 188
  9   librustc_driver-0adc2d977ed6a50d.dy 0x000000010cda5b74 _RNvNvMs0_NtNtNtCshrkeXHZkvHl_3std3sys6thread4unixNtB7_6Thread3new12thread_start + 384
  10  libsystem_pthread.dylib             0x000000018fc6fc58 _pthread_start + 136
  11  libsystem_pthread.dylib             0x000000018fc6ac1c thread_start + 8

  note: we would appreciate a report at https://github.com/rust-lang/rust
  help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216

This was in a GitHub CI, which can be seen here: https://github.com/serai-dex/serai/actions/runs/30325946574/job/90171313909

I'm currently trying to minimize/bisect it but I'm unsure how successful that will be.

This is after removing the brew-installed rustc and installing rust via rustup (as officially documented/suggested) instead. It seems to be an immediate failure, upon any invocation, given how "error: failed to run rustc to learn about target-specific information".

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions