hyperscan
hyperscan copied to clipboard
[Bug] Scan fail for specify corpora and pattern in literal mode
Hi, everyone.
I try to use my custom corpora and simple pattern to benchmark by hsbench, it will abort(RelWithDebug) or scan fail(Release) in
literal mode.
My pattern:
# will error
1:/xt>DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD/i
# will error
# 1:/xt<DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD/i
2:/123/i
I have test in some case:
- In pattern id=1, either
>
or<
, it will error. - In pattern id=1, if i reduce the number of
D
, or replace the lastD
toA
, it works ok. - Without id=2, it works ok.
- In non-literal mode, it works ok.
- In pattern id=1, replace
xt
toxy
, it works ok
The error code is:
src/rose/program_runtime.c +3492
In function: roseRunProgram_l
This is my corpora: 23414.zip
I want to know why and how to fix it, really thanks for everyone first.
Likely same as https://github.com/intel/hyperscan/issues/303
This is due to lack of case ROSE_INSTR_TRIGGER_SUFFIX in roseRunProgram_l(), same as one of the 2 cases in #303
Current develop branch already fixes this problem. BTW the develop branch has some latest bugfix patch based on 5.4.0 master branch. You might use that for a more stable Hyperscan release currently.
Specifically, you could refer to the patch with commit id: 4c43e3ca36addb2c42ed420f4f357995a8609eb2