Skip to content

Miri's memcpy shim accepts programs that violate the C spec #2966

@RalfJung

Description

@RalfJung

Miri implements memcpy as basically an alias of copy_nonoverlapping. That's not correct though: according to the C spec, memcpy is UB when the pointer is null or dangling, even if the copy is for 0 bytes. We should fix our shim.

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