-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
"C-unwind" ABI is unsound with "-Cpanic=abort" #83116
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-c_unwind`#![feature(c_unwind)]``#![feature(c_unwind)]`I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-mediumMedium priorityMedium 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.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-c_unwind`#![feature(c_unwind)]``#![feature(c_unwind)]`I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-mediumMedium priorityMedium 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.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
In the following code,
testshould explicitly be allowed to unwind:However, when building this with
-Cpanic=abort, we generate LLVM IR as follows:This means unwinding of
testis UB, i.e., this is a soundness problem.This most likely also affects
#[unwind(allowed)], but that attribute is slated for removal anyway.