rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.65k stars 348 forks source link

Fill out windows io error mapping table #4046

Closed CraftSpider closed 1 week ago

CraftSpider commented 1 week ago

Adds a bunch more of the Windows error codes to the error mapping list. This is all the error codes currently recognized by std IO decoding (https://github.com/rust-lang/rust/blob/75703c1a78c3cd99fa1347b237f3966fb8860e98/library/std/src/sys/pal/windows/mod.rs#L74). When multiple errors map to the same io value, I chose to prefer-non WSA and the most generic sounding variant for the backwards mapping.

RalfJung commented 1 week ago

Thanks!

When multiple errors map to the same io value, I chose to prefer-non WSA and the most generic sounding variant for the backwards mapping.

Please add a comment in the code documenting this choice.

cgettys-microsoft commented 1 week ago

@sivadeilra - here's one of the PRs related to adding Miri support for Windows FS APIs, RE: https://github.com/rust-lang/miri/issues/3482