Getting SIGSEGV with Rust 1.47.0 on macos #77849
Labels
A-spurious
Area: Spurious failures in builds (spuriously == for no apparent reason)
C-bug
Category: This is a bug.
E-needs-bisection
Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
O-macos
Operating system: macOS
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I'm getting intermittent
SIGSEGV: invalid memory reference
crashes when compiling projects. This has started happening when upgrading from 1.46.0 (stable) to 1.47.0 (stable) on MacOS.For instance, compiling the
master
branch of https://github.com/gfx-rs/wgpu-rs:cargo run --example cube
error: could not compile syn.
Caused by: process didn't exit successfully: rustc --crate-name syn --edition=2018 /Users/rjacobs/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/syn-1.0.31/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' --cfg 'feature="visit"' -C metadata=3015984c4aad08eb -C extra-filename=-3015984c4aad08eb --out-dir /Users/rjacobs/sandbox/wgpu-rs/target/debug/deps -L dependency=/Users/rjacobs/sandbox/wgpu-rs/target/debug/deps --extern proc_macro2=/Users/rjacobs/sandbox/wgpu-rs/target/debug/deps/libproc_macro2-ca449e9a62227554.rmeta --extern quote=/Users/rjacobs/sandbox/wgpu-rs/target/debug/deps/libquote-4e89379d9f53f035.rmeta --extern unicode_xid=/Users/rjacobs/sandbox/wgpu-rs/target/debug/deps/libunicode_xid-4f1ac68564fd7c97.rmeta --cap-lints allow --cfg syn_disable_nightly_tests
(signal: 11, SIGSEGV: invalid memory reference)`If I simply start the build again with
cargo run --example cube
eventually it will compile and run correctly. Also, in the above example it'ssyn
that fails, but other crates may also cause the crash randomly.Sometimes I'm also getting panics in rustc instead of SIGSEGV. I assume this is related to miscompilation in an earlier stage. I can't really add too many other details since I'm no debugging expert on MacOS but I'm happy to run some debugging commands to help.
rustc --version --verbose
:rustc 1.47.0 (18bf6b4 2020-10-07)
binary: rustc
commit-hash: 18bf6b4
commit-date: 2020-10-07
host: x86_64-apple-darwin
release: 1.47.0
LLVM version: 11.0
The text was updated successfully, but these errors were encountered: