intel / hyperscan

High-performance regular expression matching library
https://www.hyperscan.io
Other
4.8k stars 715 forks source link

[Bug] Scan fail for specify corpora and pattern in literal mode #353

Closed pengtianabc closed 1 year ago

pengtianabc commented 2 years ago

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. image

My pattern:

# will error
1:/xt>DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD/i
# will error
# 1:/xt<DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD/i
2:/123/i

I have test in some case:

The error code is: src/rose/program_runtime.c +3492 In function: roseRunProgram_l image

This is my corpora: 23414.zip

I want to know why and how to fix it, really thanks for everyone first.

danlark1 commented 2 years ago

Likely same as https://github.com/intel/hyperscan/issues/303

hongyang7 commented 1 year ago

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