Closed noword closed 1 year ago
Hyperscan only provides a "-G" option of Grey Box modification only for hs* tools in non-release build case, you could refer to their usage comments.
Take hsbench for exmaple:
https://github.com/intel/hyperscan/blob/5c724f73d1aa5add73c06c97c59930899c713d47/tools/hsbench/main.cpp#L192-L198
For above hsbench, you may use:
./bin/hsbench -G limitPatternLength:1024000 -e xxx -c xxx
For other usage, there's no simple way for such value assignment.
Hyperscan only provides a "-G" option of Grey Box modification only for *hs tools in non-release build** case, you could refer to their usage comments. Take hsbench for exmaple:
For above hsbench, you may use:
./bin/hsbench -G limitPatternLength:1024000 -e xxx -c xxx
For other usage, there's no simple way for such value assignment.
I use hyperscan as a library in my project.
In the end I used ue2::hs_compile_multi_int
with a custom ue2::Grey.
Thanks anyway.
The defualt value of Grey::limitPatternLength is 16000 (16K bytes), it's small for me. I change the value in src/grey.cpp, then recompile the liberay.
Is there a more elegant way, change the value at runtime?
Thanks.