Fix decoding attributes of SyntheticCoroutineBody - #159085
Conversation
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| .get(self, parent_id) | ||
| .expect("no encoded attributes for a structure or variant") | ||
| } | ||
| DefPathData::SyntheticCoroutineBody => { |
There was a problem hiding this comment.
Could we add a regression test for this?
This fixes an ICE while decoding attributes of an external SyntheticCoroutineBody, but the PR currently has no test
covering that cross-crate path. A Miri regression test would likely be the closest match for #156905, since it
exercises find_attr! / attrs_for_def.
There was a problem hiding this comment.
A regression test would be great yeah, I think taking the test from quiode@dd72b0b makes sense, I'll do that
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
ddab93f to
d5c5473
Compare
|
cc @rust-lang/miri |
|
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. |
| //@normalize-stderr-test: "/rustc-dev/[^/]*/" -> "/rustc-dev/$HASH/" | ||
|
|
||
| // Miri ICE when encountering a `SyntheticCoroutineBody` from an external crate (see | ||
| // `closure_ice_lib` for details). Calling the async closure triggers the ICE. |
There was a problem hiding this comment.
I hope we don't ICE any more? Why all this error normalization in a "pass" test?
There was a problem hiding this comment.
The description still says "triggers", that should be "triggered" maybe? Also maybe link the issue.
There was a problem hiding this comment.
Sounds reasonable, fixed
bd9cacd to
768a041
Compare
a29dcd5 to
9f85877
Compare
|
That's great, thanks :) |
9f85877 to
9fa75e3
Compare
Co-authored-by: Dominik Schwaiger <mail@dominik-schwaiger.ch>
9fa75e3 to
e12d28f
Compare
|
@bors r+ |
…, r=folkertdev Fix decoding attributes of `SyntheticCoroutineBody` Fixes rust-lang#156905 by returning an empty list of attributes for `SyntheticCoroutineBody` when its attributes are decoded
…uwer Rollup of 8 pull requests Successful merges: - #159085 (Fix decoding attributes of `SyntheticCoroutineBody`) - #159554 (feat: Update method signature of int_from_ascii) - #159637 (Some place analysis tweaks) - #159961 (sanitize_standard_fds: Miri supports poll now) - #159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs) - #159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static) - #159840 (Fix opaque type ICE in late lints under the next-generation trait solver) - #159956 (Fix observable intermediate state in `thread::add_spawn_hook`)
|
⌛ Testing commit e12d28f with merge d1cf67d... Workflow: https://github.com/rust-lang/rust/actions/runs/30233565748 |
Fix decoding attributes of `SyntheticCoroutineBody` Fixes #156905 by returning an empty list of attributes for `SyntheticCoroutineBody` when its attributes are decoded
|
@bors yield |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #159085. |
…uwer Rollup of 8 pull requests Successful merges: - #159085 (Fix decoding attributes of `SyntheticCoroutineBody`) - #159554 (feat: Update method signature of int_from_ascii) - #159637 (Some place analysis tweaks) - #159961 (sanitize_standard_fds: Miri supports poll now) - #159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs) - #159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static) - #159840 (Fix opaque type ICE in late lints under the next-generation trait solver) - #159956 (Fix observable intermediate state in `thread::add_spawn_hook`)
…, r=folkertdev Fix decoding attributes of `SyntheticCoroutineBody` Fixes rust-lang#156905 by returning an empty list of attributes for `SyntheticCoroutineBody` when its attributes are decoded
…uwer Rollup of 14 pull requests Successful merges: - #158417 (Avoid ICE when cfg_eval recovers no item from derive input) - #159085 (Fix decoding attributes of `SyntheticCoroutineBody`) - #159554 (feat: Update method signature of int_from_ascii) - #159637 (Some place analysis tweaks) - #159649 (Normalize region obligations before regionck) - #159961 (sanitize_standard_fds: Miri supports poll now) - #159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs) - #159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static) - #159804 (Expand docs for fs::metadata and fs::symlink_metadata) - #159821 (Update expect message using the recommended style in binary_heap module) - #159840 (Fix opaque type ICE in late lints under the next-generation trait solver) - #159956 (Fix observable intermediate state in `thread::add_spawn_hook`) - #159991 (std: make send_process_group_signal unsupported on VxWorks) - #159996 (Detect when a macro without exclamation mark uses square brackets)
…uwer Rollup of 14 pull requests Successful merges: - rust-lang/rust#158417 (Avoid ICE when cfg_eval recovers no item from derive input) - rust-lang/rust#159085 (Fix decoding attributes of `SyntheticCoroutineBody`) - rust-lang/rust#159554 (feat: Update method signature of int_from_ascii) - rust-lang/rust#159637 (Some place analysis tweaks) - rust-lang/rust#159649 (Normalize region obligations before regionck) - rust-lang/rust#159961 (sanitize_standard_fds: Miri supports poll now) - rust-lang/rust#159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs) - rust-lang/rust#159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static) - rust-lang/rust#159804 (Expand docs for fs::metadata and fs::symlink_metadata) - rust-lang/rust#159821 (Update expect message using the recommended style in binary_heap module) - rust-lang/rust#159840 (Fix opaque type ICE in late lints under the next-generation trait solver) - rust-lang/rust#159956 (Fix observable intermediate state in `thread::add_spawn_hook`) - rust-lang/rust#159991 (std: make send_process_group_signal unsupported on VxWorks) - rust-lang/rust#159996 (Detect when a macro without exclamation mark uses square brackets)
View all comments
Fixes #156905 by returning an empty list of attributes for
SyntheticCoroutineBodywhen its attributes are decoded