Skip to content

TRPL: FFI section doesn't mention that unwinding through languages is UB #26443

Closed
@Gankra

Description

@Gankra

If C calls into a Rust function that panics it's Undefined Behaviour if it's not caught before the FFI boundary. You need to spawn a thread (stable) or catch_panic (unstable) if you can panic.

Similarly if e.g. C++ unwinds into Rust this is also Undefined Behaviour, though this is perhaps out of scope as a "Rust" problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions