Skip to content

locate, updatedb, xargs: avoid panic on a non-UTF-8 argument - #853

Merged
sylvestre merged 1 commit into
uutils:mainfrom
AbhinavMir:non-utf8-args-no-panic
Aug 25, 2026
Merged

locate, updatedb, xargs: avoid panic on a non-UTF-8 argument#853
sylvestre merged 1 commit into
uutils:mainfrom
AbhinavMir:non-utf8-args-no-panic

Conversation

@AbhinavMir

@AbhinavMir AbhinavMir commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

These three entry points collected their arguments with std::env::args,
which panics when an argument is not valid Unicode. An argument that is
not valid UTF-8 therefore aborted the process with exit code 101 before
any work started.

Collect the arguments with args_os instead, and report the first invalid
argument on stderr with exit code 1, as find already does.
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.31%. Comparing base (fe25054) to head (f3fa654).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #853      +/-   ##
==========================================
+ Coverage   92.29%   92.31%   +0.02%     
==========================================
  Files          35       35              
  Lines        7445     7466      +21     
  Branches      388      388              
==========================================
+ Hits         6871     6892      +21     
  Misses        433      433              
  Partials      141      141              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Commit f3fa654 has test result changes:

bfs testsuite:

Test results comparison:
  Current:   TOTAL: 316 / PASSED: 273 / FAILED: 37 / SKIPPED: 6
  Reference: TOTAL: 317 / PASSED: 274 / FAILED: 37 / SKIPPED: 6

Changes from main branch:
  TOTAL: -1
  PASSED: -1
  FAILED: +0

No result in this run (1) - hung, crashed, or renamed:
  ? gnu/executable (was PASS)

@codspeed-hq

codspeed-hq Bot commented Aug 24, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing AbhinavMir:non-utf8-args-no-panic (f3fa654) with main (fe25054)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (05752b8) during the generation of this report, so fe25054 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@sylvestre
sylvestre merged commit 3de01a0 into uutils:main Aug 25, 2026
23 checks passed
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.

2 participants