bytecodealliance / rustix

Safe Rust bindings to POSIX-ish APIs
Other
1.46k stars 152 forks source link

regression in rustix 0.38.33+ on i686-unknown-linux-gnu #1052

Closed decathorpe closed 5 months ago

decathorpe commented 5 months ago

I started seeing build failures of at least to crates (async-process, polling) after I updated the Fedora Linux package for rustix from v0.38.31 to v0.38.33.

The crashes in the async-process and polling crates' test suites originate at an Option::unwrap() in rustix code:

thread 'test::polled_driver' panicked at /usr/share/cargo/registry/rustix-0.38.33/src/backend/linux_raw/param/auxv.rs:298:68:
called `Option::unwrap()` on a `None` value

see also my original report against polling: https://github.com/smol-rs/polling/issues/200


EDIT: I now realize that this change could also have been introduced in rustix v0.38.32, but we skipped that version in Fedora, so I can't say for sure.

decathorpe commented 5 months ago

I'm now also seeing similar failures in timerfd v1.6.0 on x86_64, with a None-unwrap at the same location in rustix, so I'm not sure if this is even specific to i686-unknown-linux-gnu.

sunfishcode commented 5 months ago

Thanks for the report! This is fixed in rustix 0.38.34.

The regression was introduced in rustix 0.38.33, which I've now yanked.

decathorpe commented 5 months ago

Thanks! Sorry that I didn't check 0.38.34 specifically - the only change I saw was https://github.com/bytecodealliance/rustix/pull/1049 and it didn't sound relevant at all.

sunfishcode commented 5 months ago

What happened was, #1049 has what I thought was a simple fix for a compiler warning, but later discovered actually fixes this bug.

decathorpe commented 5 months ago

Can confirm that 0.38.34 fixes the issue. The polling, async-process, and timerfd crates' test suites pass again. Thank you!