Repository navigation
Avoid ICE on None from prepare_vtable_segments - #164476
Conversation
|
This PR changes a file inside |
|
Error: Failed to set assignee to
Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip. |
|
r? types |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
|
Reminder, once the PR becomes ready for a review, use |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Avoid ICE on None from prepare_vtable_segments
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (f5b086f): comparison URL. Overall result: no relevant changes - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary -0.3%, secondary -0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -0.0%, secondary -0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 487.555s -> 487.967s (0.08%) |
This comment has been minimized.
This comment has been minimized.
|
🔨 4 commits were squashed into 8443ca7. |
8e581bf to
8443ca7
Compare
Avoid ICE on None from prepare_vtable_segments Closes rust-lang#153368 I actually just realized None caused the ICE and None was semantic for the caller, meaning I could just propagate the None instead of unwrapping and to my surprised ICE is fixed and no test is broken! The issue here is that I'm not sure the implications of changing this signature, but it seems to work fine. r? trait-system-refactor-initiative
…uwer Rollup of 22 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
…uwer Rollup of 22 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
…uwer Rollup of 22 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
Avoid ICE on None from prepare_vtable_segments Closes rust-lang#153368 I actually just realized None caused the ICE and None was semantic for the caller, meaning I could just propagate the None instead of unwrapping and to my surprised ICE is fixed and no test is broken! The issue here is that I'm not sure the implications of changing this signature, but it seems to work fine. r? trait-system-refactor-initiative
…uwer Rollup of 23 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #165123 (Temporarily drop macos-26 jobs) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
…uwer Rollup of 23 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #165123 (Temporarily drop macos-26 jobs) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
…uwer Rollup of 22 pull requests Successful merges: - #165032 (stdarch subtree update) - #165123 (Temporarily drop macos-26 jobs) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
Rollup merge of #164476 - lsunsi:issue153368, r=oli-obk Avoid ICE on None from prepare_vtable_segments Closes #153368 I actually just realized None caused the ICE and None was semantic for the caller, meaning I could just propagate the None instead of unwrapping and to my surprised ICE is fixed and no test is broken! The issue here is that I'm not sure the implications of changing this signature, but it seems to work fine. r? trait-system-refactor-initiative
…uwer Rollup of 22 pull requests Successful merges: - rust-lang/rust#165032 (stdarch subtree update) - rust-lang/rust#165123 (Temporarily drop macos-26 jobs) - rust-lang/rust#165072 (Submodule update of rustc-perf) - rust-lang/rust#144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - rust-lang/rust#162342 (More stdarch regression tests) - rust-lang/rust#163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - rust-lang/rust#164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - rust-lang/rust#164916 (CI: rfl: move job forward to Linux v7.3) - rust-lang/rust#164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - rust-lang/rust#164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - rust-lang/rust#165083 (Gate `z` inline asm template modifier) - rust-lang/rust#165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - rust-lang/rust#161131 (Check associated const binding types) - rust-lang/rust#161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - rust-lang/rust#164315 (make powerpc `Complex` ABI GCC-compatible) - rust-lang/rust#164476 (Avoid ICE on None from prepare_vtable_segments) - rust-lang/rust#165003 (follow up for global-alloc-reentry test) - rust-lang/rust#165020 (Bless mir-opt panic-abort tests) - rust-lang/rust#165066 (skip max_repr_align in Layout::eq_abi) - rust-lang/rust#165080 (Syntactically allow C-variadics in parenthesized argument lists) - rust-lang/rust#165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - rust-lang/rust#165082 (Remove stability note from `rust_splat`)
…ethod-vtable-slot, r=oli-obk Improve delayed bug comment and message on first_method_vtable_slot This PR follows from rust-lang#164476. It's just a leftover improvement so that the bug mirrors a similar case in https://github.com/lsunsi/rust/blob/92b5b8c87c61b20adc9001b41baf587634a74734/compiler/rustc_trait_selection/src/traits/vtable.rs#L441. --- Following @oli-obk suggestion I tried looking for other approaches in order to avoid the None and add the `unwrap` back. The main one would be to short-circuit the `first_method_vtable_slot` call by short-circuiting up the call stack when an error or taint is found. In that sense I realized the callstack is roughtly `is_recursive_terminator > ... > resolve_instance_raw > ... > resolve_associated_item > ... > first_method_vtable_slot` when we reach the previous ICE, which doesn't lead much space for that idea. Further, since `trait_ref.has_non_region_infer() || trait_ref.has_non_region_param()` is being checked in order to avoid this exact `first_method_vtable_slot` call, I thought maybe we could have another `trait_ref` property that could be used in the same way for our specific test case. Upon checking most of the `has_` methods and `error_reported` I saw nothing useful, which seems to lead to the conclusion that the previous fix was good enough. Then I just resorted to copying the comment from a similar place with similar behavior to the place I added the delayed bug previously. r? @oli-obk
…ethod-vtable-slot, r=oli-obk Improve delayed bug comment and message on first_method_vtable_slot This PR follows from rust-lang#164476. It's just a leftover improvement so that the bug mirrors a similar case in https://github.com/lsunsi/rust/blob/92b5b8c87c61b20adc9001b41baf587634a74734/compiler/rustc_trait_selection/src/traits/vtable.rs#L441. --- Following @oli-obk suggestion I tried looking for other approaches in order to avoid the None and add the `unwrap` back. The main one would be to short-circuit the `first_method_vtable_slot` call by short-circuiting up the call stack when an error or taint is found. In that sense I realized the callstack is roughtly `is_recursive_terminator > ... > resolve_instance_raw > ... > resolve_associated_item > ... > first_method_vtable_slot` when we reach the previous ICE, which doesn't lead much space for that idea. Further, since `trait_ref.has_non_region_infer() || trait_ref.has_non_region_param()` is being checked in order to avoid this exact `first_method_vtable_slot` call, I thought maybe we could have another `trait_ref` property that could be used in the same way for our specific test case. Upon checking most of the `has_` methods and `error_reported` I saw nothing useful, which seems to lead to the conclusion that the previous fix was good enough. Then I just resorted to copying the comment from a similar place with similar behavior to the place I added the delayed bug previously. r? @oli-obk
…ethod-vtable-slot, r=oli-obk Improve delayed bug comment and message on first_method_vtable_slot This PR follows from rust-lang#164476. It's just a leftover improvement so that the bug mirrors a similar case in https://github.com/lsunsi/rust/blob/92b5b8c87c61b20adc9001b41baf587634a74734/compiler/rustc_trait_selection/src/traits/vtable.rs#L441. --- Following @oli-obk suggestion I tried looking for other approaches in order to avoid the None and add the `unwrap` back. The main one would be to short-circuit the `first_method_vtable_slot` call by short-circuiting up the call stack when an error or taint is found. In that sense I realized the callstack is roughtly `is_recursive_terminator > ... > resolve_instance_raw > ... > resolve_associated_item > ... > first_method_vtable_slot` when we reach the previous ICE, which doesn't lead much space for that idea. Further, since `trait_ref.has_non_region_infer() || trait_ref.has_non_region_param()` is being checked in order to avoid this exact `first_method_vtable_slot` call, I thought maybe we could have another `trait_ref` property that could be used in the same way for our specific test case. Upon checking most of the `has_` methods and `error_reported` I saw nothing useful, which seems to lead to the conclusion that the previous fix was good enough. Then I just resorted to copying the comment from a similar place with similar behavior to the place I added the delayed bug previously. r? @oli-obk
Rollup merge of #165190 - lsunsi:improve-delayed-bug-first-method-vtable-slot, r=oli-obk Improve delayed bug comment and message on first_method_vtable_slot This PR follows from #164476. It's just a leftover improvement so that the bug mirrors a similar case in https://github.com/lsunsi/rust/blob/92b5b8c87c61b20adc9001b41baf587634a74734/compiler/rustc_trait_selection/src/traits/vtable.rs#L441. --- Following @oli-obk suggestion I tried looking for other approaches in order to avoid the None and add the `unwrap` back. The main one would be to short-circuit the `first_method_vtable_slot` call by short-circuiting up the call stack when an error or taint is found. In that sense I realized the callstack is roughtly `is_recursive_terminator > ... > resolve_instance_raw > ... > resolve_associated_item > ... > first_method_vtable_slot` when we reach the previous ICE, which doesn't lead much space for that idea. Further, since `trait_ref.has_non_region_infer() || trait_ref.has_non_region_param()` is being checked in order to avoid this exact `first_method_vtable_slot` call, I thought maybe we could have another `trait_ref` property that could be used in the same way for our specific test case. Upon checking most of the `has_` methods and `error_reported` I saw nothing useful, which seems to lead to the conclusion that the previous fix was good enough. Then I just resorted to copying the comment from a similar place with similar behavior to the place I added the delayed bug previously. r? @oli-obk
…uwer Rollup of 22 pull requests Successful merges: - rust-lang/rust#165032 (stdarch subtree update) - rust-lang/rust#165123 (Temporarily drop macos-26 jobs) - rust-lang/rust#165072 (Submodule update of rustc-perf) - rust-lang/rust#144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - rust-lang/rust#162342 (More stdarch regression tests) - rust-lang/rust#163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - rust-lang/rust#164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - rust-lang/rust#164916 (CI: rfl: move job forward to Linux v7.3) - rust-lang/rust#164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - rust-lang/rust#164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - rust-lang/rust#165083 (Gate `z` inline asm template modifier) - rust-lang/rust#165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - rust-lang/rust#161131 (Check associated const binding types) - rust-lang/rust#161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - rust-lang/rust#164315 (make powerpc `Complex` ABI GCC-compatible) - rust-lang/rust#164476 (Avoid ICE on None from prepare_vtable_segments) - rust-lang/rust#165003 (follow up for global-alloc-reentry test) - rust-lang/rust#165020 (Bless mir-opt panic-abort tests) - rust-lang/rust#165066 (skip max_repr_align in Layout::eq_abi) - rust-lang/rust#165080 (Syntactically allow C-variadics in parenthesized argument lists) - rust-lang/rust#165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - rust-lang/rust#165082 (Remove stability note from `rust_splat`)
View all comments
Closes #153368
I actually just realized None caused the ICE and None was semantic for the caller, meaning I could just propagate the None instead of unwrapping and to my surprised ICE is fixed and no test is broken!
The issue here is that I'm not sure the implications of changing this signature, but it seems to work fine.
r? trait-system-refactor-initiative