XSUM_hashStream exits on file read errors, breaks multiple input processing #1064
Labels
No labels
announcement
bug
build
CI
dependencies
documentation
duplicate
enhancement
experience feedback
feature request
github_actions
help wanted
install
invalid
Long-term
optimization
portability
question
target-specific
test issue
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Cyan4973/xxHash#1064
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
github.com/Cyan4973/xxHash@bab7e27f4c/cli/xxhsum.c (L279-L281)XSUM_hashStreamexits onferrorwith theError: a failure occurred reading the input file.message.This prevents processing multiple input files.
In my case, finding FS/device errors was exactly the point of running xxhsum. When processing files in batches and parsing the output, if the process exited prematurely, the whole batch was marked as failed which resulted in great number of false negatives.
It requires updating
XSUM_hashStream()so that it can return an error. Right now, it can only return successfully, and therefore itexit()when it can't.Sure.
If fixing this is not planned, the docs should mention that outputting any result for every input file is not guaranteed.