backport "rerun in original typing mode if we meet any opaques in post analysis" to stable - #161555
backport "rerun in original typing mode if we meet any opaques in post analysis" to stable#161555lcnr wants to merge 3 commits into
Conversation
|
r? @davidtwco rustbot has assigned @davidtwco. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
This comment has been minimized.
This comment has been minimized.
|
no idea if this is correct for a stable backport xd |
This comment has been minimized.
This comment has been minimized.
0237223 to
c10713e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Normally we would just label the original PR and discuss from there, but that's ok. Did the object test come from a different PR? |
Summary: D117423626 rust-lang/rust#161441 Miscompilation on 1.98.0 stable, waiting for PR rust-lang/rust#161555 before 1.98.1 release. In the meantime, revert the 1.98.0 bump and wait. Reviewed By: dtolnay Differential Revision: D117431620 fbshipit-source-id: 7f93e5654ba6c2783e7411df47b62a1c3fdcc32c
Summary: D117423626 rust-lang/rust#161441 Miscompilation on 1.98.0 stable, waiting for PR rust-lang/rust#161555 before 1.98.1 release. In the meantime, revert the 1.98.0 bump and wait. Reviewed By: dtolnay Differential Revision: D117431620 fbshipit-source-id: 7f93e5654ba6c2783e7411df47b62a1c3fdcc32c
Summary: D117423626 rust-lang/rust#161441 Miscompilation on 1.98.0 stable, waiting for PR rust-lang/rust#161555 before 1.98.1 release. In the meantime, revert the 1.98.0 bump and wait. Reviewed By: dtolnay Differential Revision: D117431620 fbshipit-source-id: 7f93e5654ba6c2783e7411df47b62a1c3fdcc32c
Summary: D117423626 rust-lang/rust#161441 Miscompilation on 1.98.0 stable, waiting for PR rust-lang/rust#161555 before 1.98.1 release. In the meantime, revert the 1.98.0 bump and wait. Reviewed By: dtolnay Differential Revision: D117431620 fbshipit-source-id: 7f93e5654ba6c2783e7411df47b62a1c3fdcc32c
Summary: D117423626 rust-lang/rust#161441 Miscompilation on 1.98.0 stable, waiting for PR rust-lang/rust#161555 before 1.98.1 release. In the meantime, revert the 1.98.0 bump and wait. Reviewed By: dtolnay Differential Revision: D117431620 fbshipit-source-id: 7f93e5654ba6c2783e7411df47b62a1c3fdcc32c
Summary: D117423626 rust-lang/rust#161441 Miscompilation on 1.98.0 stable, waiting for PR rust-lang/rust#161555 before 1.98.1 release. In the meantime, revert the 1.98.0 bump and wait. Reviewed By: dtolnay Differential Revision: D117431620 fbshipit-source-id: 7f93e5654ba6c2783e7411df47b62a1c3fdcc32c
|
Here's my attempt at drafting the release notes and blog post. Release notes: [rustc: fix miscompilation in vtable generation](https://github.com/rust-lang/rust/issues/161441)Blog post (last paragraph copied from the 1.97.1 blog post): Rust 1.98.1 fixes a [miscompilation in vtable generation](https://github.com/rust-lang/rust/issues/161441).
In Rust 1.98.0, in some circumstances, rustc would incorrectly generate a trait object vtable with a null pointer
where a function pointer should be. When an affected method is called, this is likely to cause a segmentation fault
with optimizations turned off, but may cause (arbitrary) undefined behavior with optimizations turned on.
If you'd like to help us out by testing future releases, you might consider
running your code's CI or locally using the beta channel (`rustup default beta`) or the nightly
channel (`rustup default nightly`). Please
[report](https://github.com/rust-lang/rust/issues/new/choose) any bugs you
might come across! |
|
Suggested edits: it should be "affected", and we should probably call this UB directly. -where a function pointer should be. When an effected method is called, this would cause a segmentation fault
-with optimizations turned off, but may cause arbitrary behavior with optimizations turned on.
+where a function pointer should be. When an affected method is called, this would cause a segmentation fault
+with optimizations turned off, but may cause arbitrary undefined behavior with optimizations turned on.... although I'm not sure it's even safe to make any specific behavior claim about the non-opt case either. |
Edited, and added a "likely" qualifier. |
backport of #158993 to stable, fixes #161441
we didn't notice that a beta cutoff happened between #156742 and #158993 and it's easy to forget that we need to be careful with next-solver bugs as they can affect stable via coherence and
impossible_predicates.