-
Notifications
You must be signed in to change notification settings - Fork 765
Description
Hello,
Im new in c, c++ and I wanted to install snort3 with hyperscan support from source.
So I have debian bookworm and have to make some changes:
set (CMAKE_CXX_STANDARD 14) and CXX_FLAGS "-std=c++14". because of unique_ptr
set CXX_FLAGS -lpthread because of error with compilation
next wiht pcre, I did not install libhyperscan(which is old pcre.h lib) from default debian mirror.
I have to download old unofficial version of PCRE - none other available. So i did not like it.
So i downloaded latest PCRE2 source and rewrited the hyperscan to PCRE2.
for example pcre_exec, changed to pcre2_match|compile etc. with pcre2.h support and some castings things
The result is that the unit-hyperscan runs without errors but unit-chimera run with 35 errors. log is below:
maybe because of this:
https://stackoverflow.com/questions/70273084/regex-differences-between-pcre-and-pcre2
a) So I would like to ask you if the unit-hyperscan|chimera runs all tests OK. is it all valid?
b) And that 35 errors are due to new PCRE2 syntax? (32 errors is due to badpattern)
[ RUN ] Scan.ScratchInUse
/home/fucker/Downloads/hyperscan-master/unit/chimera/scan.cpp:375: Failure
Value of: rc.matches
Actual: 14
Expected: 1U
Which is: 1
[ FAILED ] Scan.ScratchInUse (2 ms)
[ RUN ] Scan.CallbackNoSkip1
/home/fucker/Downloads/hyperscan-master/unit/chimera/scan.cpp:460: Failure
Value of: count
Actual: 18
Expected: 7U
Which is: 7
[ FAILED ] Scan.CallbackNoSkip1 (3 ms)
[ RUN ] Scan.CallbackNoSkip2
/home/fucker/Downloads/hyperscan-master/unit/chimera/scan.cpp:481: Failure
Value of: count
Actual: 31
Expected: 4U
Which is: 4
[ FAILED ] Scan.CallbackNoSkip2 (2 ms)
[ RUN ] Compile/HybridCompile.BadPattern/0
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: (foo
[ FAILED ] Compile/HybridCompile.BadPattern/0, where GetParam() = "(foo" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/1
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: foo)
[ FAILED ] Compile/HybridCompile.BadPattern/1, where GetParam() = "foo)" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/2
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: ((foo)
[ FAILED ] Compile/HybridCompile.BadPattern/2, where GetParam() = "((foo)" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/3
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: (foo))
[ FAILED ] Compile/HybridCompile.BadPattern/3, where GetParam() = "(foo))" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/4
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: a+++
[ FAILED ] Compile/HybridCompile.BadPattern/4, where GetParam() = "a+++" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/5
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: a+?+
[ FAILED ] Compile/HybridCompile.BadPattern/5, where GetParam() = "a+?+" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/6
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: a???
[ FAILED ] Compile/HybridCompile.BadPattern/6, where GetParam() = "a???" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/7
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: a??+
[ FAILED ] Compile/HybridCompile.BadPattern/7, where GetParam() = "a??+" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/8
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: ?qa
[ FAILED ] Compile/HybridCompile.BadPattern/8, where GetParam() = "?qa" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/9
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: *abc
[ FAILED ] Compile/HybridCompile.BadPattern/9, where GetParam() = "*abc" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/10
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: +abc
[ FAILED ] Compile/HybridCompile.BadPattern/10, where GetParam() = "+abc" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/11
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: ^?0
[ FAILED ] Compile/HybridCompile.BadPattern/11, where GetParam() = "^?0" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/12
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: ^0
[ FAILED ] Compile/HybridCompile.BadPattern/12, where GetParam() = "^0" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/13
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: ^+0
[ FAILED ] Compile/HybridCompile.BadPattern/13, where GetParam() = "^+0" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/14
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: ^{1,3}0
[ FAILED ] Compile/HybridCompile.BadPattern/14, where GetParam() = "^{1,3}0" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/15
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: 0$?
[ FAILED ] Compile/HybridCompile.BadPattern/15, where GetParam() = "0$?" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/16
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: 0$
[ FAILED ] Compile/HybridCompile.BadPattern/16, where GetParam() = "0$" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/17
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: 0$+
[ FAILED ] Compile/HybridCompile.BadPattern/17, where GetParam() = "0$+" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/18
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: 0${1,3}
[ FAILED ] Compile/HybridCompile.BadPattern/18, where GetParam() = "0${1,3}" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/19
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: []
[ FAILED ] Compile/HybridCompile.BadPattern/19, where GetParam() = "[]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/20
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: []foobar
[ FAILED ] Compile/HybridCompile.BadPattern/20, where GetParam() = "[]foobar" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/21
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [-\80 [ FAILED ] Compile/HybridCompile.BadPattern/21, where GetParam() = "[-\80" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/22
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [[:foo:]]
[ FAILED ] Compile/HybridCompile.BadPattern/22, where GetParam() = "[[:foo:]]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/23
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [[:1234:]]
[ FAILED ] Compile/HybridCompile.BadPattern/23, where GetParam() = "[[:1234:]]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/24
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [[:f\oo:]]
[ FAILED ] Compile/HybridCompile.BadPattern/24, where GetParam() = "[[:f\oo:]]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/25
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [[: :]]
[ FAILED ] Compile/HybridCompile.BadPattern/25, where GetParam() = "[[: :]]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/26
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [[:...:]]
[ FAILED ] Compile/HybridCompile.BadPattern/26, where GetParam() = "[[:...:]]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/27
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [[:l\ower:]]
[ FAILED ] Compile/HybridCompile.BadPattern/27, where GetParam() = "[[:l\ower:]]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/28
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [[:abc:]]
[ FAILED ] Compile/HybridCompile.BadPattern/28, where GetParam() = "[[:abc\:]]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/29
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [abc[:x]pqr:]]
[ FAILED ] Compile/HybridCompile.BadPattern/29, where GetParam() = "[abc[:x\]pqr:]]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/30
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: [[:a\dz:]]
[ FAILED ] Compile/HybridCompile.BadPattern/30, where GetParam() = "[[:a\dz:]]" (0 ms)
[ RUN ] Compile/HybridCompile.BadPattern/31
/home/fucker/Downloads/hyperscan-master/unit/chimera/bad_patterns.cpp:46: Failure
Expected: (0) != (err), actual: 0 vs 0
Compile should have failed for expr: foobar
[ FAILED ] Compile/HybridCompile.BadPattern/31, where GetParam() = "foobar\" (0 ms)
thnx