Closed
Description
Running rustc --test -g main.rs
with any of the following in main.rs
on macOS:
#[test]
fn test_1() {
assert!(false);
}
fn main() {
}
// Empty
Produces a main.dSYM
containing an empty file at main.dSYM/Contents/Resources/DWARF/main
. A bug in Rust's libbacktrace (courtesy of myself) causes any attempt to take a backtrace while such a dSYM
file is present in the same directory as the executable (even if it is not produced from that executable) to die of SIGBUS
. Even without that, this prevents both panic backtraces and debugging from taking advantage of debug data with executables containing test harnesses on macOS. As @alexcrichton determined, this is a regression in the range 4279e2b...8493813 and likely related to #45511.