-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
__CxxFrameHandler3 still referenced even though panic=abort #101134
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsT-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-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsT-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-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
I tried this code:
With this section in
Cargo.toml:And also disabled msvcrt.lib. Unfortunately rust does not have a good way to do this so I used a build script to add a libs directory that contains an empty msvcrt.lib:
For a full example see: https://github.com/ChrisDenton/panic-abort
I expected to see this happen: When running
cargo build --release, the symbol__CxxFrameHandler3is not referenced at all. Because withpanic=abortthere should be no panic code.Instead, this happened:
__CxxFrameHandler3is referenced. This causes the following linker error because I disabled msvcrt.lib:Version it worked on
It most recently worked on: 1.59
rustc +1.59 --version --verboseVersion with regression
rustc +1.60 --version --verbose:@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged