-
-
Notifications
You must be signed in to change notification settings - Fork 15k
[ICE]: find_attr! panics for SyntheticCoroutineBody (in Miri, related to rustc_no_writable) #156905
Copy link
Copy link
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Some time ago, I introduced some changes in Miri (rust-lang/miri#4988) that made it use the
find_attr!macro. I then ran Miri with those changes on some crates and found a compiler panic. As the panic originates inside thefind_attr!logic and not from Miri, I assume this is the right place to open the issue.It seems that when the
find_attr!is called on an external crate on a specific type of function, the logic does not handle it correctly. To be more precise, indecoder.rsinget_item_attrs:the
assert_eqfails. It seems like this function only expects thisunwrapto happen for constructors, but apparently it also happens forSyntheticCoroutineBody.Initially, I found this panic in the
agent-client-protocolcrate, version0.12.1using the testagent-client-protocol::jsonrpc_advanced test_bidirectional_communicationwhen running Miri with tree borrows and implicit writes enabled on it. But since then also many more crates can show this error. I could also replicate it here inside the Miri test suite: quiode@dd72b0b.Error output
(
RUST_BACKTRACE=1produces the same output)