bug(sort): when ulimit -v 1048576 and passing to ./sort /dev/full panics
Open
Nobody has claimed this yet.
U - sort
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Hi, uutils mainteners
as our test confirms when we use ulimit, sort panics
relunsec@relunsec:~/software/coreutils/target/debug$ ./sort /dev/full
memory allocation of 1207959552 bytes failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped) ./sort /dev/full
while the gnu one
relunsec@relunsec:~/software/coreutils/target/debug$ gnusort /dev/full
gnusort: memory exhausted
relunsec@relunsec:~/software/coreutils/target/debug$
as i see it says memory exhausted, however the uu one panics when ulimit
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
Reproduce the failure with the reported ulimit, ./sort /dev/full, and GNU sort for comparison. Then locate the sort entry point and its memory-error handling; done means the Rust implementation reports memory exhaustion and exits without panicking under the same limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100