-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Stack overflow in clippy_utils::check_proc_macro::ty_search_pat
#11533
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
Comments
MCVE: fn cmd_outcome_task2(x: &mut fn()) {
} Backtrace of just before reaching ty_search_pat: Expand
Happens in the |
Looks like clippy recurses forever when passing a rust-clippy/clippy_utils/src/check_proc_macro.rs Lines 334 to 337 in 4022591
I'm not too sure how this function works, so, cc @Centri3 (commit author) for awareness :D |
Think I copied that from the other arms, yet there's no shadowing of We should change this to either having an empty end ( |
Dependent on `<https://github.com/rust-lang/rust-clippy/issues/11533>` being fixed.
Update: clippy shipped with Rust 1.73.0 stable also has this issue. |
Just ran into this while fuzzing 🙃 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
When running
cargo clippy ..
on my project, a stack overflow happens.The backtrace is:
Reproducer
I couldn't come up with an MCVE, but here are commands to obtain the code and what I use to run clippy:
Also seen on github actions
The commit that introduced this behaviour is likely
a55d4584
(2 commits back), and I suspect the overflow may be to do with:crate/cmd_rt/src/cmd_execution.rs:136
, i.e.CmdBlockRtBox
, which is a type alias forPin<Box<dyn CmdBlockRt<..>>
Here's the tricky thing:
clippy-driver
command to run ingdb
from that.rustc
(so I don't know what it was in 1).clippy-driver
command, instead it runs.../cargo .../rustc ...
.gdb command, from nightly maybe 2023-09-12
Added
-vv
to thecargo clippy ..
command to get the following (I added thegdb args
):Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: