rust-lang / rust-lang/rust-clippy

huge memory consumption on testcase

Open
#4,630 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

I-ICE
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

cc https://github.com/rust-lang/rust-clippy/issues/3142
This was found by running clippy on glacier https://github.com/rust-lang/glacier
./fixed/23600.rs

static V1: [u8; 0xffff_ffff] = [0u8; 0xffff_ffff];
fn main() { V1[0]; }

seems to want to consume all of the systems run when checked with clippy.

clippy 0.0.212 (648e5b9 2019-10-01)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running Clippy on fixed/23600.rs, which declares the large static array shown in the issue, and observe its memory use while checking the testcase. Trace the check far enough to identify where the excessive allocation occurs; done means this testcase no longer consumes essentially all system memory when checked with Clippy.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.