-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
regression: misaligned pointer dereference: address must be a multiple ... #111487
Comments
#98112 doesn't seem to have an FCP for doing this, which makes some sense (it's just "exploiting" UB). @saethlin did we file PRs against the relevant crates which break the most transitive tests at least? e.g., rand_core 0.2.x, 0.3.x, 0.4.x seem to be a good fraction of this list. There's a few more crates that seem to stand out too (e.g., plotters-bitmap). |
We did not make any effort to file fixes for the relevant crates. The The |
The only things I think are significant are: An issue in an old version (almost 4 years old) of Multiple crates hitting an issue in I don't think these are worth doing anything with. All we could do here is ask maintainers to backport fixes. |
Sounds like that's right. The main thing we usually try to ensure is that there is some upgrade path, especially for common code, and I think this covers most of that. Plus it technically won't affect non-debug builds, so users have that escape hatch too. I'm fine leaving this as-is. |
Don't check for misaligned raw pointer derefs inside Rvalue::AddressOf From rust-lang#112026 (comment): rustc 1.70 (stable next week) added a Mir pass to add pointer alignment checks in debug mode. Adding these checks caused some crates to break, but that was expected, since they contain broken code (rust-lang#111487) for tracking that. However, the checks added are slightly more aggressive than they should have been. Specifically, they also check the place in an `addr_of!` expression. Whether lack of alignment there is or isn't UB is unclear. This PR modifies the pass to not affect those cases. I spot checked the crater regressions and the ones I saw were not the case that this PR is modifying. It still seems good to not land anything overaggressive though
Don't check for misaligned raw pointer derefs inside Rvalue::AddressOf From rust-lang/rust#112026 (comment): rustc 1.70 (stable next week) added a Mir pass to add pointer alignment checks in debug mode. Adding these checks caused some crates to break, but that was expected, since they contain broken code (rust-lang/rust#111487) for tracking that. However, the checks added are slightly more aggressive than they should have been. Specifically, they also check the place in an `addr_of!` expression. Whether lack of alignment there is or isn't UB is unclear. This PR modifies the pass to not affect those cases. I spot checked the crater regressions and the ones I saw were not the case that this PR is modifying. It still seems good to not land anything overaggressive though
I think
|
@Mark-Simulacrum Should this issue stay open? I don't think we have an actual regression here. |
Yeah, I think we can close this. |
A bunch of these seem to come from rand_core 0.2.1, 0.3.0, and 0.4.0 code (not sure if we can fix it there?)
Not rand_core:
cc #98112
The text was updated successfully, but these errors were encountered: