Skip to content

cmp::parse_params exits the process on --help instead of returning #220

@pocopepe

Description

@pocopepe

When --help is passed to cmp::parse_params, it calls process::exit(0) which kills the whole process. Found this while working on the fuzz targets, the fuzzer kept crashing because of it.
Workaround is to filter --help before calling parse_params, but ideally the function should just return the help text instead of exiting.

Not sure if this is worth a bigger refactor or just leaving the workaround in place, open to suggestions.
Example CI failure: https://github.com/uutils/diffutils/actions/runs/24710862259

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions