hyperscan icon indicating copy to clipboard operation
hyperscan copied to clipboard

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

Open pengtianabc opened this issue 2 years ago • 1 comments

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:

  • In pattern id=1, either > or <, it will error.
  • In pattern id=1, if i reduce the number of D, or replace the last D to A, it works ok.
  • Without id=2, it works ok.
  • In non-literal mode, it works ok.
  • In pattern id=1, replace xt to xy, it works ok

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.

pengtianabc avatar Apr 01 '22 04:04 pengtianabc

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

danlark1 avatar Apr 15 '22 00:04 danlark1

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

hongyang7 avatar Oct 19 '22 17:10 hongyang7