-
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 an ineffective check in const_prop #100239
Conversation
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
b3c5a09
to
48e0184
Compare
Hmm, maybe r? @oli-obk would be a good choice here? Feel free to reassign. |
☔ The latest upstream changes (presumably #100456) made this pull request unmergeable. Please resolve the merge conflicts. |
48e0184
to
5c73f8e
Compare
☔ The latest upstream changes (presumably #100043) made this pull request unmergeable. Please resolve the merge conflicts. |
5c73f8e
to
aff9841
Compare
@oli-obk this should be ready for review now. |
@bors r+ |
Rollup of 8 pull requests Successful merges: - rust-lang#98304 (Add MaybeUninit memset test) - rust-lang#98801 (Add a `File::create_new` constructor) - rust-lang#99821 (Remove separate indexing of early-bound regions) - rust-lang#100239 (remove an ineffective check in const_prop) - rust-lang#100337 (Stabilize `std::io::read_to_string`) - rust-lang#100819 (Make use of `[wrapping_]byte_{add,sub}`) - rust-lang#100934 (Remove a panicking branch from `fmt::builders::PadAdapter`) - rust-lang#101000 (Separate CountIsStar from CountIsParam in rustc_parse_format.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…, r=oli-obk fix ConstProp handling of written_only_inside_own_block_locals Fixes a regression introduced by rust-lang#100239, which adds an early return and thus skips some code in `visit_terminator` that must be run for soundness. Fixes rust-lang#101973
…, r=oli-obk fix ConstProp handling of written_only_inside_own_block_locals Fixes a regression introduced by rust-lang#100239, which adds an early return and thus skips some code in `visit_terminator` that must be run for soundness. Fixes rust-lang#101973
Based on #100043, only the last two commits are new.
ConstProp has a special check when reading from a local that prevents reading uninit locals. However, if that local flows into
force_allocation
, then no check fires and evaluation proceeds. So this check is not really effective at preventing accesses to uninit locals.With #100043,
read_immediate
and friends always fail when reading uninit locals, so I don't see why ConstProp would need a separate check. Thus I propose we remove it. This is needed to be able to do #100085.