1213 Commits

Author SHA1 Message Date
Wang, Xiang W
49592833a7 Scratch: fix scratch free issue when memory allocation fails
Fixes github issue #174
2019-08-13 14:52:21 +08:00
Wang, Xiang W
177537313a Chimera: don't disable single match flag when checking Hyperscan support 2019-08-13 14:52:15 +08:00
Hong, Yang A
435cd23823 Literal API: update dev-reference 2019-08-13 14:52:03 +08:00
Hong, Yang A
23e5f06594 add new Literal API for pure literal expressions:
Design compile time api hs_compile_lit() and hs_compile_lit_multi()
to handle pure literal pattern sets. Corresponding option --literal-on
is added for hyperscan testing suites. Extended parameters and part of
flags are not supported for this api.
2019-08-13 14:51:38 +08:00
Chang, Harry
8bfbf07f75 Do not free stream unless hs_close_stream returns success.
(by unit-hyperscan HyperscanArgChecks.CloseStreamNoScratch)
2019-08-13 14:50:45 +08:00
Chang, Harry
4b1927c038 Logical combination: add purely negative match at EOD unit test
MultiCombPurelyNegativeUniSubEOD6.
2019-08-13 14:50:39 +08:00
Chang, Harry
fdc3c290b6 Logical combination: add streaming mode unit test MultiCombStream1. 2019-08-13 14:50:32 +08:00
Chang, Harry
64ea43ea39 Logical Combination: avoid corruption of pending combination report
in streaming mode.

Fixes github issue #165
2019-08-13 14:50:16 +08:00
Chang, Harry
1f4c10a58d Logical combination: support EOD match from purely negative case. 2019-08-13 14:50:07 +08:00
Carlo Marcelo Arenas Belón
7ea4e06275 tools: hscollider FTBS in alpine linux
alpine uses musl instead of glibc and therefore doesn't have backtrace()
as part of its libc.

POSIX mandates that _exit() be defined through unistd.h which used to be
included together with execinfo.h when backtrace() was detected and
therefore it happened to build fine for linux or freebsd (when using
libexecinfo from the system or ports).

since there was a macro already defined to test for unistd.h use that
instead and decouple this dependency, so that the code could be built
even when no backtrace() is provided (as expected also in OpenBSD)
2019-08-13 14:49:59 +08:00
Carlo Marcelo Arenas Belón
f28feee57d unit: avoid UB by making integer literal explicitally unsigned
reported by cppcheck as:

[unit/internal/uniform_ops.cpp:78]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[unit/internal/uniform_ops.cpp:109]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[unit/internal/uniform_ops.cpp:127]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[unit/internal/uniform_ops.cpp:145]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
2019-08-13 14:49:37 +08:00
Mostafa Nazari
92edc37c1f BUGFIX: fix Numerical result out of range error
Fix Error errno=34,  fix Numerical result out of range error
issue: https://github.com/intel/hyperscan/issues/155
2019-08-13 14:49:24 +08:00
Derrick Lyndon Pallas
5a1b02bc10 Fix uninitialized use of scatter_unit_uX due to padding
These non-packed structures are placed into a std::vector.  Later, they
contents of the vector are memcpy'd and the CRC of this space is taken.
Some compilers will zero the struct padding but GCC8.2 with -O2 at least
will not.  This means that the CRC is based on uninitialized memory.

Since it is expected that these bytes will be memcpy'd, zero in place once
they're in the std::vector.

Found by Valgrind.

Q.v. Issue #148
2019-08-13 14:49:15 +08:00
Derrick Lyndon Pallas
e15954a4bd Avoid array-bounds error when debug/fortify enabled
This code causes GCC to error out due to a bounds error with the following set

	-D_GLIBCXX_DEBUG
	-D_FORTIFY_SOURCE=2

The solution is to copy via iterator.
2019-08-13 14:49:07 +08:00
Derrick Lyndon Pallas
356c0ab3d4 dispatcher: return correct function type from ifunc resolver 2019-08-13 14:49:00 +08:00
Wang, Xiang W
aea440a300 Bump version number for release 2019-04-10 06:53:39 -04:00
Wang, Xiang W
933847e1d3 changelog: updates for 5.1.1 release 2019-04-10 06:53:33 -04:00
Hong, Yang A
224b16cd2f unit: check fix of rose instr program dead loop 2019-04-10 06:53:26 -04:00
root
11f13c2c8a cmake: #144 using GNUInstallDirs variables instead of hard-coding in *.pc.in 2019-04-10 06:53:16 -04:00
Hong, Yang A
bc37072d5b Rose: add necessary instruction programs to avoid dead loop
Fixes github issue #141
2019-04-10 06:53:03 -04:00
Wang, Xiang W
56e4d5a2c6 runtime: mark scratch unused only when no further scratch references 2019-04-10 06:52:55 -04:00
Wang, Xiang W
28786eb269 Rose: extend handling for unexpected logical combination programs 2019-04-10 06:52:40 -04:00
Wang, Xiang W
6dc9bed310 Rose: add handling for unexpected programs 2019-03-26 10:16:26 -04:00
Wang, Xiang W
f0bde3721e build: avoid file path impact on fat runtime build
Fixes github issue #137
2019-03-26 10:16:13 -04:00
Wang, Xiang W
5c8f06e4c8 gcc-9: fix CMake parsing of CPU architecture
GCC-9 adds known options section for march that causes regex
replace failure in CMake file

Fixes github issue #136
2019-03-26 10:16:01 -04:00
Chang, Harry
f9c78376d9 Bump version number for release 2019-01-29 14:17:13 +08:00
Chang, Harry
d4df399728 changelog: updates for 5.1.0 release 2019-01-29 14:17:07 +08:00
Wang, Xiang W
b0c0d9cd92 unit: check return value of malloc 2019-01-29 14:16:59 +08:00
Wang, Xiang W
eda1871f86 chimera: fix scratch space handling in shared scratch use case 2019-01-21 09:59:45 +08:00
Wang, Xiang W
229f3d5080 tools: add catches for C++ exceptions 2019-01-21 09:59:37 +08:00
Hong, Yang A
b5a8644b1f mcclellan: fix dump issue in wide-state case. 2019-01-21 09:59:29 +08:00
Hong, Yang A
f68723a606 literal matching: separate path for pure literal patterns 2019-01-21 09:59:22 +08:00
Wang, Xiang W
63e7d89fcc build: avoid pcre error for hscollider when using installed PCRE package
Fixes github issue #127
2019-01-21 09:59:05 +08:00
Chang, Harry
9ab674b18e fix dead loop under win10 release bin. 2019-01-21 09:58:55 +08:00
Wang, Xiang W
5ad56093f8 hscollider: fix back inserter error for windows 2019-01-21 09:58:49 +08:00
Wang, Xiang W
ff9636e022 rose: disable switch optimization for windows 2019-01-21 09:58:38 +08:00
Wang, Xiang W
35060958e4 doc: fix github repo address 2019-01-21 09:58:26 +08:00
Hong, Yang A
805a550a0a mcclellan: wide state fixes for sanitisers and accept state construction 2019-01-21 09:58:18 +08:00
Wang, Xiang W
6f3a0a323e Silence clang warnings about unused variable 2019-01-21 09:57:17 +08:00
Guangqing Chen
922fe2ab20 Rose: optimize switch-case with Labels-as-Values 2019-01-21 09:56:58 +08:00
Chang, Harry
f13cbd692e Update PCRE version to 8.42 (8.41 is also compatible) 2019-01-21 09:56:50 +08:00
Hong, Yang A
c06d5e1c14 DFA state compression: 16-bit wide and sherman co-exist 2019-01-21 09:56:37 +08:00
Wang, Xiang W
c7c4119750 chimera: silence gcc-8 exception catch warning 2019-01-21 09:56:29 +08:00
Chang, Harry
acffc9d36c Jenkins-1424: fixed error which misses report of logical combination under
vacuous input.
2019-01-21 09:56:21 +08:00
Chang, Harry
62dfd48d53 Jenkins-1080: fixed error reporting logical combination match in "A&!B" type by
moving flush_comb behind report_eod_matches in hs_close_stream/hs_reset_stream.
2019-01-21 09:56:12 +08:00
Wang, Xiang W
8a0e4f8249 Use std::distance explicitly to avoid ambiguity with boost 2019-01-11 16:05:55 +08:00
Wang, Xiang W
da4a2bd828 Bump version number for release 2018-07-09 12:41:34 -04:00
Chang, Harry
f9d72aeb87 changelog: updates for 5.0.0 release 2018-07-09 12:10:49 -04:00
Wang, Xiang W
746d1eafe5 chimera: update dev-reference 2018-07-09 12:10:37 -04:00
Wang, Xiang W
c8ec0d0ec2 chimera: add pkgconfig install files 2018-07-09 12:10:12 -04:00