Skip to content

[validation.h] Input validation crashes if problem name contains substring generat #449

@paul-wild

Description

@paul-wild

As the title says, this issue arises when the problem directory contains the substring generat and as soon as one adds validator_flags either explicitly in the problem.yaml file or implicitly by running something like bt all.

This causes an input validator to be treated as a generator, which then crashes because it expects the first argument to be an integer (the seed). The relevant line is 1446 in validation.h.

One fix could be to, instead of searching through argv[0] in its entirety, only look at the part after the problem shortname. But maybe there is also a more robust way of detecting whether we are running the file as a validator or a generator.

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