- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-bugCategory: This is a bug.Category: This is a bug.O-macosOperating system: macOSOperating system: macOSP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
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.
Metadata
Metadata
Assignees
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-bugCategory: This is a bug.Category: This is a bug.O-macosOperating system: macOSOperating system: macOSP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.