Skip to content

Is UB in FFI also UB in Rust? #485

Closed
@kpp

Description

@kpp

Link to ref: https://doc.rust-lang.org/reference/behavior-considered-undefined.html

Warning: The following list is not exhaustive. There is no formal model of Rust's semantics for what is and is not allowed in unsafe code, so there may be more behavior considered unsafe.

My question is:
Does undefined behavior inside an extern FFI function also cause an UB in Rust?


There is an item inside of the list of Behavior considered undefined:

  • Invoking undefined behavior via compiler intrinsics:

I consider adding one more item:

  • Invoking undefined behavior via FFI:

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