3 ms·
So how does Rust currently deal with calling into a C function which calls into a Rust function that panics? From what I understand based on the article and as
by DasIch 12y ago
So how does Rust currently deal with calling into a C function which calls into a Rust function that panics?
From what I understand based on the article and assuming you don't know which C compiler was used, it seems like this would be impossible to properly deal with and produce undefined behavior.
- veddan 12y agoUnwinding through C is undefined behavior, so a Rust function called from C must catch all exceptions and (preferably) return an error code to the C caller.