-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Clippy crash (version 1.59 on macOS) #8470
Comments
I'm seeing this as well (though on a different internal code base but with the same rustc version and MacOS version). Here is a stack trace of where the abort is called from:
|
This is in rustc_expand, before clippy ever runs - cc @petrochenkov Strange that it only happens in clippy though. |
Demangled (using https://crates.io/crates/rustfilt):
|
Same thing on running
This does not happen on cargo build, check or doc. Version: cargo 1.59.0 (49d8809dc 2022-02-10) |
Can't reproduce this on tonic running on |
Someone pointed out that |
rust-lang/rust#92222 might be related, cc @nnethercote |
I tried to use I also double checked, |
The crash on macOS happens with https://github.com/pantsbuild/pants as well. |
Also seeing this on https://github.com/vectordotdev/vector if that helps. Similarly it fails on |
|
I see the same thing on |
More testing of nightly versions on fend-copy:
Presumably 1.59 branched at some point during the bad four days? Where can one see what PRs merged between nightly releases? |
I'm seeing the same result as well, that it worked on |
I get a slightly different stack when running this command on artichoke/artichoke's trunk branch with the toolchain upgraded to
|
out of curiosity, would fixing this bug in clippy warrant a point release on the 1.59 toolchain? |
Same problem here. Getting this error on about 50% of my projects. Seems to be especially happening when an async runtime is part of the dependencies 🤔. Getting the same as the issue creator with fend too:
Edit: Added my clippy, cargo and rustc info.
|
Same problem here, getting it when running The CI works like a charm so it really seems macOS related. clippy 0.1.59 (9d1b2106 2022-02-23)
It seems to work fine on arm-based Macs, as far as my colleagues tested. |
have the issue on https://github.com/extrawurst/gitui swell when just running
|
Someone pinged this over on rust-lang/rust. This is related to rust-lang/rust#92173 and rust-lang/rust#92185. Clippy is not built with jemalloc, which is surface problem. I wasn't able to determine the underlying problem, though. |
`cstr` 0.2.10 reworks the proc macro to use `CStr::from_bytes_with_nul_unchecked` which was just recently made const in Rust 1.59.0. See: - https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked - upsuper/cstr@8357a00 `artichoke-backend` uses `cstr` in const contexts but cannot upgrade to Rust 1.59.0 due to rust-lang/rust-clippy#8470. Change the `cstr` version constraint to `cstr = "0.2.4, < 0.2.10" until Artichoke can upgrade its Rust toolchain to unblock March's `cargo update`.
I just want to report that issue is currently blocking me in development. If there are any work around for the macos darwin tool chain and clippy errors... would love to hear about it. |
For right now my workaround has been to use |
short update for the ones that only watch this issue:
( from rust-lang/rust#92173 , this comment, by @7596ff ) The update worked for me too. |
Thank you @syphar !!! That fixed it for me too🥳 |
Confirmed fixed in 1.60.0. |
I installed Xcode 13.3 and I still have the problem. Is there something required, like a rebuild of clippy? |
1.60 fixed it for me. |
1.60.0 fixed my problem also. Thank you! |
It's fixed for me as well, so I'll go ahead and close this issue. |
Clippy wasn't working properly on intel mac. See: rust-lang/rust-clippy#8470
Summary
Trying to run
cargo clippy
(version 1.59, macOS 12.2.1, x64) on a fresh checkout of https://github.com/printfn/fend (commit 3a392e50d45d5dce70bcdde9e22961517b895093) crashes inconsistently: after running the command 10 times (withcargo clean
inbetween), it crashed exactly 5 times. It didn't used to crash on Rust 1.58.1. I have not been able to reproduce this on Linux.The message that appears looks like this:
When I tried rerunning just the
clippy-driver
command that failed, I got this output:Reproducer
I tried this code: see above
I expected to see this happen: clippy runs correctly without crashing
Instead, this happened: clippy crashed
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: