Skip to content

XSUM_hashStream exits on file read errors, breaks multiple input processing #1064

@ZoomRmc

Description

@ZoomRmc

xxHash/cli/xxhsum.c

Lines 279 to 281 in bab7e27

if (ferror(inFile)) {
XSUM_log("Error: a failure occurred reading the input file.\n");
exit(1);

XSUM_hashStream exits on ferror with the Error: 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions