1
Fork 0

Auto merge of #124210 - the8472:consign-ebadf-to-the-fire, r=Mark-Simulacrum

Abort a process when FD ownership is violated

When an owned FD has already been closed before it's dropped that means something else touched an FD in ways it is not allowed to. At that point things can already be arbitrarily bad, e.g. clobbered mmaps. Recovery is not possible.
All we can do is hasten the fire.

Unlike the previous attempt in #124130 this shouldn't suffer from the possibility that FUSE filesystems can return arbitrary errors.
This commit is contained in:
bors 2024-04-28 06:20:28 +00:00
commit cb49406457
6 changed files with 49 additions and 5 deletions

View file

@ -356,6 +356,7 @@
#![feature(str_internals)]
#![feature(strict_provenance)]
#![feature(strict_provenance_atomic_ptr)]
#![feature(ub_checks)]
// tidy-alphabetical-end
//
// Library features (alloc):