Skip to content

unsupported operation: renameat2, openat, openat2, ... #3931

Open
@cyphar

Description

@cyphar

libc::renameat2 is a fairly commonly used function on Linux (especially since it is the only way of doing atomic file swaps on Linux with RENAME_EXCHANGE) that Miri does not yet support:

test flags::tests::rename_flags_is_supported ... error: unsupported operation: can't call foreign function `renameat2` on OS `linux`
   --> src/syscalls.rs:602:9
    |
602 | /         libc::renameat2(
603 | |             olddirfd.as_raw_fd(),
604 | |             oldpath.to_c_string().as_ptr(),
605 | |             newdirfd.as_raw_fd(),
606 | |             newpath.to_c_string().as_ptr(),
607 | |             flags,
608 | |         )
    | |_________^ can't call foreign function `renameat2` on OS `linux`
    |
    = help: if this is a basic API commonly used on this target, please report an issue with Miri
    = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases
% cargo +nightly --version
cargo 1.83.0-nightly (80d82ca22 2024-09-27)
% cargo +nightly miri --version
miri 0.1.0 (fb4aebd 2024-09-30)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-filesArea: related to files, paths, sockets, file descriptors, or handlesA-shimsArea: This affects the external function shimsC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementS-blockedStatus: blocked on something happening somewhere else

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions