Skip to content

numfmt: handle output write errors#12558

Open
cyphercodes wants to merge 2 commits into
uutils:mainfrom
cyphercodes:fix-numfmt-write-errors-12551
Open

numfmt: handle output write errors#12558
cyphercodes wants to merge 2 commits into
uutils:mainfrom
cyphercodes:fix-numfmt-write-errors-12551

Conversation

@cyphercodes
Copy link
Copy Markdown

Summary

  • Propagate numfmt output write failures instead of unwrapping them in formatting writers.
  • Report stdout write failures as write error: ... I/O errors with status 1.
  • Add a Linux/Android /dev/full regression test to ensure this does not panic.

Tests

  • cargo test -p uu_numfmt
  • cargo test --no-default-features --features numfmt test_numfmt
  • cargo clippy -p uu_numfmt -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Fixes #12551

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)

@sylvestre
Copy link
Copy Markdown
Contributor

Note : the section is comment 0 "Tests " isn't useful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

numfmt panics (aborts) on output write errors instead of reporting them

2 participants