comm: "- -" deadlocks
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
coreutils 0.10.0 (multi-call binary), latest commit
uutils comm hangs:
printf 'test' | ./comm - -
gnu comm behaves differently:
printf 'test' | gnucomm - -
test
gnucomm: -
gnu comm's behavior seems non-deterministic, with larger inputs it leaves stray leftovers and cuts lines based on glibc stdio buffer sizes.
Possible solutions would be to
a) replicate gnu comm's behavior or
b) reject "- -" as arguments
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 reproducing the hang with printf 'test' | ./comm - -, then compare it with gnucomm - - and larger inputs. Read the comm command entry point and its handling of standard input and the - operands. Done means the behavior is intentionally matched to GNU comm or - - is rejected without deadlocking, with the chosen behavior covered by a regression test.
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
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100