Skip to content

book: claim about segfaults happening only in unsafe blocks is not true #30819

Closed
@ivan

Description

@ivan

If a Rust program segfaults, you can be sure it’s somewhere in the sections marked unsafe.

https://doc.rust-lang.org/nightly/book/unsafe.html

But as far as I understand it, an unsafe block can instead break an invariant that causes a segfault further down the line in safe code.

Also, stack overflows can cause a segfault.

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