`du` overflows the stack
Open
Nobody has claimed this yet.
U - du
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Here are the steps to reproduce:
$ mkdir -p $(yes a | head -n 1024 | tr '\n' '/')
$ uu-du a
Segmentation fault (core dumped) uu-du a
Most likely because of this recursive call:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported 1,024-level reproduction, then inspect the recursive call in src/uu/du/src/du.rs at lines 685-693. Trace how nested directories are traversed and verify that uu-du a completes without a segmentation fault while preserving its directory-size output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100