43 Commits

Author SHA1 Message Date
Danila Kutenin
9af996b936 Fix all ASAN issues in vectorscan 2022-02-18 17:14:51 +00:00
Konstantinos Margaritis
08357a096c remove Windows/ICC support 2021-10-12 11:51:34 +03: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
1f4c10a58d Logical combination: support EOD match from purely negative case. 2019-08-13 14:50:07 +08:00
Hong, Yang A
224b16cd2f unit: check fix of rose instr program dead loop 2019-04-10 06:53:26 -04:00
Wang, Xiang W
b0c0d9cd92 unit: check return value of malloc 2019-01-29 14:16:59 +08:00
Chang, Harry
8a1c497f44 Logical Combination of patterns. 2018-06-27 14:04:57 +08:00
Matthew Barr
1891f14755 Add support for Hamming distance approx matching 2018-01-19 06:11:43 -05:00
Alex Coyte
952f0aad21 support dynamic stream compression 2017-08-21 11:18:54 +10:00
Justin Viiret
3bd0c7f6ad unit-hyperscan: pure-literal/smwr coverage 2017-08-21 11:09:35 +10:00
Alex Coyte
d317d75615 character classes: handle \Q\E and utf8 2017-06-21 08:43:44 +10:00
Matthew Barr
91db20d8eb avx512: CPU detection and platform hints 2017-05-30 13:59:23 +10:00
Justin Viiret
a4df49dd66 unit: better output from expr_info unit tests 2017-04-26 15:18:25 +10:00
Justin Viiret
a871f70c25 ng_extparam: split up work and do per-comp reduce
This change breaks extparam processing up into:

 - propagateExtendedParams: propagates min_length, min_offset and
   max_offset into the reports on the graph
 - reduceExtendedParams: runs graph reductions based on extparams

Then, we apply the reduce pass to the whole graph, and later as well to
each component after calc_components.
2017-04-26 15:18:22 +10:00
Justin Viiret
d8eb259ac7 serialize: tidy 2017-04-26 15:17:03 +10:00
Justin Viiret
bc7da2807a unit: modernise test_util 2017-04-26 15:17:03 +10:00
Justin Viiret
1376f3849a serialize: parameterize on pattern as well 2017-04-26 15:17:03 +10:00
Justin Viiret
a97ec56aee serialize: add vectored mode 2017-04-26 15:17:03 +10:00
Justin Viiret
5edecbf539 ng: check can_never_match before validate_fuzzy 2017-04-26 15:16:03 +10:00
Anatoly Burakov
9f72dede5c Add support for approximate matching in NFA matcher unit tests 2017-04-26 15:11:54 +10:00
Anatoly Burakov
2de6706df2 Adding support for compiling approximate matching patterns
Adds new "edit_distance" extparam
2017-04-26 15:11:39 +10:00
Justin Viiret
1245156f44 parser: handle "control verbs" without close paren 2017-04-26 14:59:02 +10:00
Justin Viiret
bef6889844 parser: use control_verb parser inline 2017-04-26 14:58:43 +10:00
Justin Viiret
1875d55cf1 parser: add initial parser for control verbs
This more reliably handles control verbs like (*UTF8) that can only
happen at the start of the pattern, and allows them in any ordering.
2017-04-26 14:57:46 +10:00
Alex Coyte
fbaa0a1b25 make expected too large patterns even larger 2017-04-26 14:44:49 +10:00
Alex Coyte
8f8ba2d591 basic unit test to check correct stream state is being used. 2017-03-01 13:05:10 +11:00
Matthew Barr
0d0e1a5106 api: hs_valid_platform 2016-12-14 15:35:13 +11:00
Matthew Barr
c1bc6acdea unit test for github issue #30 2016-08-29 11:30:15 +10:00
Matthew Barr
b8d33732b5 Check for misaligned memory in compile error code
We now check that mem alloc for error message is aligned, and
fail with an appropriate message in the compile error.
2016-08-10 15:10:09 +10:00
Justin Viiret
67e450115a parser: ignore \E that is not preceded by \Q
This conforms to PCRE's behaviour, where an isolated \E that is not
preceded by \Q is ignored.
2016-08-10 15:08:01 +10:00
Boris Nagaev
b73bd9b6e1 new test: deserializers fail with garbage input 2016-08-10 14:08:59 +10:00
Justin Viiret
73610c0b64 scratch: don't leave in use after hs_clone_scratch
Also updated unit tests to always check hs_alloc_scratch()'s return
value.
2016-05-18 16:28:03 +10:00
Justin Viiret
c12b953131 runtime: add error for "scratch in use"
This commit adds the HS_SCRATCH_IN_USE error, which is returned when
Hyperscan detects that a scratch region is already in use on entry to an
API function.
2016-05-18 16:27:29 +10:00
Justin Viiret
12921b7c97 Add hs_expression_ext_info() API function
This is a variant of hs_expression_info() that can also accept extended
parameters.
2016-04-20 13:34:54 +10:00
Justin Viiret
98eff64edf ng_prefilter: turn large max bound into inf
During prefilter region replacement, turn regions with very large max
bounds into repeats with inf max bound. This improves compile time and
the likelihood that we will actually be able to build an implementation
for such patterns.
2016-03-01 11:22:45 +11:00
Justin Viiret
fd19168025 Restore \Q..\E support in character classes 2015-11-18 15:27:05 +11:00
Justin Viiret
9cffa7666f Refine ComponentClass::class_empty
ComponentClass::class_empty should only be used on finalized classes to
determine whether a given class contains any elements; it should not
take the cr_ucp or cps_ucp into account, as they have been folden in by
the finalize call.

Fixes our failure to identify that the pattern /[^\D\d]/8W can never
match.
2015-11-10 14:36:39 +11:00
Justin Viiret
9a7b912a5d Rework parser rejection for POSIX collating elems
Implement rejection of POSIX collating elements ("[.ch.]" and "[=ch=]"
entirely in the Ragel parser, using the same approach both inside and
ouside character classes.

Fix buggy rejection of [^.ch.], which we should accept as a character
class.
2015-11-10 14:36:39 +11:00
Justin Viiret
1afc591c30 Check for (and throw on) large min repeat
We were only checking for large maximum bounds, which meant that we
would attempt to compile A{N,} where N is huge.
2015-10-30 11:28:37 +11:00
Justin Viiret
9ff1303cd8 Allow no scratch for stream reset API calls
Bring hs_reset_stream(), hs_reset_and_copy_stream()'s functionality into
line with hs_close_stream() by accepting a NULL scratch if and only if
the match callback is also NULL, indicating that no matches should be
delivered.
2015-10-30 11:28:37 +11:00
Justin Viiret
4a98c664b4 HyperscanScanGigabytesMatch: use a vector 2015-10-30 11:28:37 +11:00
Matthew Barr
904e436f11 Initial commit of Hyperscan 2015-10-20 09:13:35 +11:00