-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ptr-int transmute in std::sync::mpsc #95621
Conversation
r? @yaahc (rust-highfive has picked a reviewer for you, use r? to override) |
d6e824e
to
127309f
Compare
127309f
to
a696e0a
Compare
The previous CI run failed due to a 360 minute timeout. Interesting. |
Since rust-lang#95340 landed, Miri with -Zmiri-check-number-validity produces an error on the test suites of some crates which implement concurrency tools, because it seems like such crates tend to use std::sync::mpsc in their tests. This fixes the problem by storing pointer bytes in a pointer.
a696e0a
to
dec73f5
Compare
The patch LGTM (it's mostly a straight-forward replacement of usize by a pointer type), and I checked that @bors r+ |
📌 Commit dec73f5 has been approved by |
…alfJung Remove ptr-int transmute in std::sync::mpsc Since rust-lang#95340 landed, Miri with `-Zmiri-check-number-validity` produces an error on the test suites of some crates which implement concurrency tools<sup>*</sup>, because it seems like such crates tend to use `std::sync::mpsc` in their tests. This fixes the problem by storing pointer bytes in a pointer. <sup>*</sup> I have so far seen errors in the test suites of `once_cell`, `parking_lot`, and `crossbeam-utils`. (just updating the list for fun, idk) Also `threadpool`, `async-lock`, `futures-timer`, `fragile`, `scoped_threadpool`, `procfs`, `slog-async`, `scheduled-thread-pool`, `tokio-threadpool`, `mac`, `futures-cpupool`, `ntest`, `actix`, `zbus`, `jsonrpc-client-transports`, `fail`, `libp2p-gossipsub`, `parity-send-wrapper`, `async-broadcast,` `libp2p-relay`, `http-client`, `mockito`, `simple-mutex`, `surf`, `pollster`, and `pulse`. Then I turned the bot off.
☀️ Test successful - checks-actions |
Finished benchmarking commit (7af9329): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
rustup rust-lang/rust#95621 made channels strict provenance compliant. :)
Highly likely a real regression, but it's small enough that I'm not too worried, and seems to largely be due to increases in trait-related queries. This is probably due to increased complexity of standard library types making it a little more expensive to prove things like Sized, Send, etc. May also be noise and paired with #95253 / https://perf.rust-lang.org/compare.html?start=7af93292c27cd8b4a14f0f35bcb4c7e7ca9c287a&end=32c26302620b2dbbe0a2291f1969bc0b1622ae59&stat=instructions:u, which reverted most of the regression here. @rustbot label: +perf-regression-triaged |
Since #95340 landed, Miri with
-Zmiri-check-number-validity
produces an error on the test suites of some crates which implement concurrency tools*, because it seems like such crates tend to usestd::sync::mpsc
in their tests. This fixes the problem by storing pointer bytes in a pointer.* I have so far seen errors in the test suites of
once_cell
,parking_lot
, andcrossbeam-utils
.(just updating the list for fun, idk)
Also
threadpool
,async-lock
,futures-timer
,fragile
,scoped_threadpool
,procfs
,slog-async
,scheduled-thread-pool
,tokio-threadpool
,mac
,futures-cpupool
,ntest
,actix
,zbus
,jsonrpc-client-transports
,fail
,libp2p-gossipsub
,parity-send-wrapper
,async-broadcast,
libp2p-relay
,http-client
,mockito
,simple-mutex
,surf
,pollster
, andpulse
. Then I turned the bot off.