Skip to content

Eliminate integer-to-pointer casts in futex for compatibility with Miri? #1627

@newpavlov

Description

@newpavlov

In one of my projects this line is the only place where Miri complains (warning by default, hard error with -Zmiri-strict-provenance).

The cast itself looks pretty suspicious to me and the quoted text is no longer present in the linked man page. Ideally, it would be nice to eliminate it completely, but as a quick and dirty workaround checking for zero and returning ptr::null() gated behind #[cfg(miri)] would work in most cases as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions