Running rustc --test -g main.rs with any of the following in main.rs on macOS:
#[test]
fn test_1() {
assert!(false);
}
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.
cc @alexcrichton @kennytm
Running
rustc --test -g main.rswith any of the following inmain.rson macOS:Produces a
main.dSYMcontaining an empty file atmain.dSYM/Contents/Resources/DWARF/main. A bug in Rust's libbacktrace (courtesy of myself) causes any attempt to take a backtrace while such adSYMfile is present in the same directory as the executable (even if it is not produced from that executable) to die ofSIGBUS. 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.cc @alexcrichton @kennytm