Skip to content

Unrecognised flag exception for HS_FLAG_COMBINATION in ParsedExpression::ParsedExpression #291

@foxever

Description

@foxever

HS_FLAG_ALL is not include all valid hyperscan flags, which may cause flags check failed, eg

#define HS_FLAG_ALL ( HS_FLAG_CASELESS \
| HS_FLAG_DOTALL \
| HS_FLAG_MULTILINE \
| HS_FLAG_UTF8 \
| HS_FLAG_UCP \
| HS_FLAG_PREFILTER \
| HS_FLAG_SINGLEMATCH \
| HS_FLAG_ALLOWEMPTY \
| HS_FLAG_SOM_LEFTMOST)

eg, flag HS_FLAG_COMBINATION failed to pass check and throw an Unrecognised flag exception

if (flags & ~HS_FLAG_ALL) {
DEBUG_PRINTF("Unrecognised flag, flags=%u.\n", flags);
throw CompileError("Unrecognised flag.");
}

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