-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Default behavior of unwinding in FFI functions #58794
Copy link
Copy link
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language teamRelevant to the language team
Description
Activity
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language teamRelevant to the language team
This is the tracking issue for the behavior of unwinding through FFI functions.
There are two choices here: we can abort if unwinding occurs through an
extern "C"boundary. We abort on beta 1.34 and nightly 1.35, but will permit unwinding in stable 1.33.We previously attempted this change in 1.24 and reverted in 1.24.1. We attempted to do so again in 1.33, but reverted once again pending lang team discussion on the topic.
There has been discussion on this topic in #52652, #58760, and #55982.
The stable behavior of permitting unwinding is UB, and can be triggered in safe code (#52652 (comment)). Notably,
mozjpegdepends on this behavior and seems to have no good stable alternatives; there's been some discussion on internals.There is an RFC discussing this: rust-lang/rfcs#2699.