about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/memmap.rs
AgeCommit message (Collapse)AuthorLines
2025-02-05Couple of changes to run rustc in miribjorn3-8/+8
2024-03-15Issue 122262: MAP_PRIVATE for more reliability on virtualised filesystems.Guillaume Yziquel-2/+8
Adding support of quirky filesystems occuring in virtualised settings not having full POSIX support for memory mapped files. Example: current virtiofs with cache disabled, occuring in Incus/LXD or Kata Containers. Has been hitting various virtualised filesystems since 2016, depending on their levels of maturity at the time. The situation will perhaps improve when virtiofs DAX support patches will have made it into the qemu mainline. On a reliability level, using the MAP_PRIVATE sycall flag instead of the MAP_SHARED syscall flag for the mmap() system call does have some undefined behaviour when the caller update the memory mapping of the mmap()ed file, but MAP_SHARED does allow not only the calling process but other processes to modify the memory mapping. Thus, in the current context, using MAP_PRIVATE copy-on-write is marginally more reliable than MAP_SHARED. This discussion of reliability is orthogonal to the type system enforced safety policy of rust, which does not claim to handle memory modification of memory mapped files triggered through the operating system and not the running rust process.
2023-08-19elaborate a bit on the (lack of) safety in 'Mmap::map'Ralf Jung-1/+6
2023-04-19`deny(unsafe_op_in_unsafe_fn)` in `rustc_data_structures`Maybe Waffle-1/+2
2023-04-09Fix some clippy::complexityNilstrieb-1/+1
2023-04-05Yeet `owning_ref`Maybe Waffle-9/+1
Turns out - `owning_ref` is unsound due to `Box` aliasing stuff - `rustc` doesn't need 99% of the `owning_ref` API - `rustc` can use a far simpler abstraction that is `OwnedSlice`
2022-12-03Auto merge of #105218 - matthiaskrgr:rollup-8d3k08n, r=matthiaskrgrbors-3/+3
Rollup of 9 pull requests Successful merges: - #104199 (Keep track of the start of the argument block of a closure) - #105050 (Remove useless borrows and derefs) - #105153 (Create a hacky fail-fast mode that stops tests at the first failure) - #105164 (Restore `use` suggestion for `dyn` method call requiring `Sized`) - #105193 (Disable coverage instrumentation for naked functions) - #105200 (Remove useless filter in unused extern crate check.) - #105201 (Do not call fn_sig on non-functions.) - #105208 (Add AmbiguityError for inconsistent resolution for an import) - #105214 (update Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-01Remove useless borrows and derefsMaybe Waffle-3/+3
2022-11-26Rewrite LLVM's archive writer in Rustbjorn3-0/+6
This allows it to be used by other codegen backends
2022-07-02define MmapMut and use it in Decodable implYoshiki Matsuda-1/+62
2021-04-03Add safety comment to StableAddress impl for Mmapbjorn3-0/+4
2021-03-31Inline a few methodsbjorn3-0/+3
2021-03-30Add an Mmap wrapper to rustc_data_structuresbjorn3-0/+40
This wrapper implements StableAddress and falls back to directly reading the file on wasm32