Clippy wrongly reports clippy::large_stack_arrays on static struct #9460
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
Hello, I have a problem with clippy::large_stack_arrays lint.
Clippy reports clippy::large_stack_arrays on a
public static mut
struct defined likeand here's the short output from clippy
clippy suggests to put this on heap, but it is not possible because it's a static struct.
Thank you!
Lint Name
clippy::large_stack_arrays
Reproducer
git clone https://github.com/AFLplusplus/LibAFL.git
git checkout b86314282907aa77d727e3bb9a1b03b75ad441c0
cargo +nightly clippy --all --all-features
Clippy reports
But, in our code, this is a
pub static mut
struct (https://github.com/AFLplusplus/LibAFL/blob/main/libafl_targets/src/cmplog.rs#L158)and it is not possible to allocate this on heap
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: