Skip to content

Inconsistent callout behaviour between JIT and not-JIT #325

@addisoncrump

Description

@addisoncrump

Discovered with #322.

It appears that in some cases, the callout behaviour between JIT'd regex and non-JIT'd regex diverges in the presence of the autocallout and no_start_optimize flags.

sh-5.2$ xxd callout_crash 
00000000: 0000 0000 0400 015c 283f 216e 293f 3e3f  .......\(?!n)?>?
00000010: 3e3f 3e3e                                >?>>
sh-5.2$ ./pcre2_fuzzer callout_crash 
Encountered failure while performing match errorcode comparison; context:
Pattern/sample string (hex encoded): 283f216e293f3e3f3e3f3e3e
Compile options 00110004 never_backslash_c,auto_callout,no_start_optimize
Match options 00002000
Non-JIT'd operation emitted an error: callout error code (-37)
JIT'd operation did not emit an error.
1 matches discovered by JIT'd regex:
Match 0 (hex encoded): 3e3e

The sample regex here is (?!n)?>?>?>>.

Not sure if this is considered a bug, but may indicate that there's a deeper bug associated with these flags.

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