]> git.ipfire.org Git - thirdparty/vectorscan.git/log
thirdparty/vectorscan.git
9 years agoWork around for deficiency in C++11/14/17 standard
Matthew Barr [Sun, 8 Jan 2017 22:30:03 +0000 (09:30 +1100)] 
Work around for deficiency in C++11/14/17 standard

As explained to us by STL at Microsoft (the author of their
vector), there is a hole in the standard wrt the vector copy
constructor, which always exists even if it won't compile.

9 years agodump: render literals as regexes (with comments)
Justin Viiret [Mon, 9 Jan 2017 00:05:02 +0000 (11:05 +1100)] 
dump: render literals as regexes (with comments)

9 years agofdr: compile algo/heuristics improvements
Justin Viiret [Tue, 6 Dec 2016 04:56:27 +0000 (15:56 +1100)] 
fdr: compile algo/heuristics improvements

These changes fix a small bug in the algorithm used for bucket
assignment in FDR's compile process, and also tweak a few of the
heuristics governing it.

9 years agoChange sqlite3_errstr to sqlite3_errmsg
EaseTheWorld [Wed, 25 Jan 2017 23:42:53 +0000 (08:42 +0900)] 
Change sqlite3_errstr to sqlite3_errmsg

sqlite3_errstr was introduced in 3.7.15 (http://sqlite.org/changes.html)
which breaks build in redhat6 (sqlite3 ver 3.6.X)
and in line 77, sqlite3_errmsg is already used.

9 years agoMerge branch 'master' into develop
Matthew Barr [Wed, 26 Apr 2017 04:14:28 +0000 (14:14 +1000)] 
Merge branch 'master' into develop

9 years agoMerge branch 'release-4.4' into github_master v4.4.1
Matthew Barr [Wed, 1 Mar 2017 02:09:48 +0000 (13:09 +1100)] 
Merge branch 'release-4.4' into github_master

9 years agoBump version number for release
Matthew Barr [Tue, 28 Feb 2017 02:18:25 +0000 (13:18 +1100)] 
Bump version number for release

9 years agochangelog: updates for 4.4.1
Matthew Barr [Tue, 28 Feb 2017 02:18:09 +0000 (13:18 +1100)] 
changelog: updates for 4.4.1

9 years agoruntime: init more of scratch in pure-literal exec
Justin Viiret [Mon, 27 Feb 2017 22:38:57 +0000 (09:38 +1100)] 
runtime: init more of scratch in pure-literal exec

9 years agolbr: set lastEscape on expand
Alex Coyte [Mon, 27 Feb 2017 05:46:24 +0000 (16:46 +1100)] 
lbr: set lastEscape on expand

9 years agoCheck if any tugs are alive when compressing/expanding repeats
Alex Coyte [Mon, 27 Feb 2017 03:22:35 +0000 (14:22 +1100)] 
Check if any tugs are alive when compressing/expanding repeats

9 years agobasic unit test to check correct stream state is being used.
Alex Coyte [Sun, 26 Feb 2017 23:33:49 +0000 (10:33 +1100)] 
basic unit test to check correct stream state is being used.

9 years agoEnsure the queue structure is initialised in roseEnginesEod().
Alex Coyte [Fri, 24 Feb 2017 04:40:39 +0000 (15:40 +1100)] 
Ensure the queue structure is initialised in roseEnginesEod().

9 years agoMerge branch develop into master v4.4.0
Matthew Barr [Fri, 20 Jan 2017 03:16:41 +0000 (14:16 +1100)] 
Merge branch develop into master

9 years agoBump version number for release
Matthew Barr [Fri, 20 Jan 2017 02:59:51 +0000 (13:59 +1100)] 
Bump version number for release

9 years agochangelog: updates for 4.4 release
Justin Viiret [Mon, 9 Jan 2017 23:31:09 +0000 (10:31 +1100)] 
changelog: updates for 4.4 release

9 years agoDocumentation updates for the fat runtime
Matthew Barr [Fri, 20 Jan 2017 02:42:26 +0000 (13:42 +1100)] 
Documentation updates for the fat runtime

9 years agocmake: test reverse_graph instead of using version
Matthew Barr [Wed, 18 Jan 2017 04:16:18 +0000 (15:16 +1100)] 
cmake: test reverse_graph instead of using version

It seems that some distros are using a patched Boost 1.62.0 which means our
workaround in reverse_graph has a conflict. Add a CMake test to see if we
need to use the patched reverse_graph.

9 years agoprefilter: workaround for \b in UCP and !UTF8 mode
Justin Viiret [Wed, 18 Jan 2017 00:33:57 +0000 (11:33 +1100)] 
prefilter: workaround for \b in UCP and !UTF8 mode

For now, just drop the assertion (which will still return a superset of
matches, as per prefiltering semantics).

9 years agowe can only trim lookarounds based on information common to all literals
Alex Coyte [Sun, 15 Jan 2017 23:14:41 +0000 (10:14 +1100)] 
we can only trim lookarounds based on information common to all literals

9 years agoensure that we add default top when creating a new infix graph
Alex Coyte [Sun, 15 Jan 2017 23:58:31 +0000 (10:58 +1100)] 
ensure that we add default top when creating a new infix graph

9 years agoBoost 1.61 required for clang/libc++
Matthew Barr [Thu, 12 Jan 2017 23:23:00 +0000 (10:23 +1100)] 
Boost 1.61 required for clang/libc++

The libc++ headers aren't specific enough and causes the compiler to think
there are ambiguous functions when using older Boost versions.

9 years agoSilence ABI notes in release builds
Matthew Barr [Thu, 12 Jan 2017 23:14:23 +0000 (10:14 +1100)] 
Silence ABI notes in release builds

9 years agoupdate copyright year
Matthew Barr [Mon, 9 Jan 2017 00:35:03 +0000 (11:35 +1100)] 
update copyright year

9 years agoMSVC gets confused by one line of the graph tests
Matthew Barr [Thu, 5 Jan 2017 04:12:56 +0000 (15:12 +1100)] 
MSVC gets confused by one line of the graph tests

9 years agoMSVC requires the attribute before the type
Matthew Barr [Thu, 5 Jan 2017 04:12:43 +0000 (15:12 +1100)] 
MSVC requires the attribute before the type

9 years agomcclellan: handle 0 length block scans correctly
Alex Coyte [Tue, 3 Jan 2017 01:57:10 +0000 (12:57 +1100)] 
mcclellan: handle 0 length block scans correctly

9 years agoAdd explicit casts to succ table entry calculations.
Alex Coyte [Mon, 19 Dec 2016 01:42:34 +0000 (12:42 +1100)] 
Add explicit casts to succ table entry calculations.

Although overflow should not be possible given the range of alphaShift, this
resolves coverity scan issues CID 158536 and CID 158537.

9 years agohyperscan#41: ignore carriage-return in pattern files
Matthew Barr [Wed, 23 Nov 2016 00:07:10 +0000 (11:07 +1100)] 
hyperscan#41: ignore carriage-return in pattern files

9 years agocmake: check the generator for fat runtime builds
Matthew Barr [Wed, 14 Dec 2016 04:15:37 +0000 (15:15 +1100)] 
cmake: check the generator for fat runtime builds

The RULE_LAUNCH_COMPILE property only works for Unix Makefiles, or
for Ninja with CMake newer than v3.0.

9 years agoSSE2 preprocessor test for MSVC
Matthew Barr [Mon, 12 Dec 2016 23:01:16 +0000 (10:01 +1100)] 
SSE2 preprocessor test for MSVC

MSVC doesn't define __SSE2__ but we can figure it out from
other macros.

9 years agoMark dispatch functions as public API
Matthew Barr [Mon, 12 Dec 2016 22:03:36 +0000 (09:03 +1100)] 
Mark dispatch functions as public API

9 years agocmake: check clang version for fat runtime support
Matthew Barr [Mon, 12 Dec 2016 05:42:32 +0000 (16:42 +1100)] 
cmake: check clang version for fat runtime support

9 years agocmake: combine hs_exec src lists correctly
Matthew Barr [Mon, 12 Dec 2016 05:37:38 +0000 (16:37 +1100)] 
cmake: combine hs_exec src lists correctly

9 years agoDon't ignore unused attrib warnings in test
Matthew Barr [Mon, 12 Dec 2016 03:52:06 +0000 (14:52 +1100)] 
Don't ignore unused attrib warnings in test

9 years agoDon't set flags for common files
Matthew Barr [Mon, 12 Dec 2016 00:55:56 +0000 (11:55 +1100)] 
Don't set flags for common files

9 years agocmake: default to fat runtime for release builds
Matthew Barr [Mon, 12 Dec 2016 00:34:15 +0000 (11:34 +1100)] 
cmake: default to fat runtime for release builds

9 years agocmake: unneeded header check
Matthew Barr [Tue, 29 Nov 2016 05:19:04 +0000 (16:19 +1100)] 
cmake: unneeded header check

9 years agoapi: hs_valid_platform
Matthew Barr [Tue, 29 Nov 2016 05:08:14 +0000 (16:08 +1100)] 
api: hs_valid_platform

9 years agoFat runtime
Matthew Barr [Wed, 2 Nov 2016 00:01:28 +0000 (11:01 +1100)] 
Fat runtime

9 years agoConvert compile-time code to not require SIMD
Matthew Barr [Thu, 6 Oct 2016 04:33:24 +0000 (15:33 +1100)] 
Convert compile-time code to not require SIMD

9 years agoRemove erroneous semicolon
Matthew Barr [Thu, 6 Oct 2016 02:51:14 +0000 (13:51 +1100)] 
Remove erroneous semicolon

9 years agomultibit, fatbit: make _size build-time only
Justin Viiret [Mon, 5 Dec 2016 05:20:52 +0000 (16:20 +1100)] 
multibit, fatbit: make _size build-time only

This commit makes mmbit_size() and fatbit_size compile-time only, and
adds a resource limit for very large multibits.

9 years agocalcDepthFromSource: only take one copy of the graph
Alex Coyte [Fri, 2 Dec 2016 05:02:09 +0000 (16:02 +1100)] 
calcDepthFromSource: only take one copy of the graph

9 years agomcsheng: remove dead code
Alex Coyte [Thu, 1 Dec 2016 23:42:26 +0000 (10:42 +1100)] 
mcsheng: remove dead code

9 years agointroduce Sheng-McClellan hybrid
Alex Coyte [Thu, 1 Dec 2016 03:32:47 +0000 (14:32 +1100)] 
introduce Sheng-McClellan hybrid

9 years agohsbench: add Hyperscan benchmarker
Matthew Barr [Wed, 14 Dec 2016 04:26:01 +0000 (15:26 +1100)] 
hsbench: add Hyperscan benchmarker

The hsbench tool provides an easy way to measure Hyperscan's
performance for a particular set of patterns and corpus of data
to be scanned.

9 years agong_literal_analysis: use ue2_graph
Justin Viiret [Tue, 29 Nov 2016 03:49:01 +0000 (14:49 +1100)] 
ng_literal_analysis: use ue2_graph

This reduces compile time ~10% on a number of large cases.

9 years agomcclellan: fix printf format specifiers
Justin Viiret [Mon, 28 Nov 2016 05:19:42 +0000 (16:19 +1100)] 
mcclellan: fix printf format specifiers

9 years agorefactor mcclellan runtime
Alex Coyte [Fri, 25 Nov 2016 04:33:27 +0000 (15:33 +1100)] 
refactor mcclellan runtime

1. use u32 to hold the state during runtime to prevent repeated zero extension
2. have a tight small loop for processing characters which breaks when
   something interesting happens

9 years agorose_build_merge: correctly merge NFA outfixes
Justin Viiret [Wed, 23 Nov 2016 04:38:26 +0000 (15:38 +1100)] 
rose_build_merge: correctly merge NFA outfixes

We were not doing our bookkeeping properly for merges where the number
of NFAs was greater than the batch size of 200.

9 years agoRework the creation of startDs edges in fillHolderForLockCheck().
Alex Coyte [Tue, 22 Nov 2016 02:48:00 +0000 (13:48 +1100)] 
Rework the creation of startDs edges in fillHolderForLockCheck().

This prevents clearing of edges created for virtual starts in late regions.

9 years agoprecise dverm fix for 5a32993: handle sign extension correctly
Alex Coyte [Thu, 17 Nov 2016 05:47:20 +0000 (16:47 +1100)] 
precise dverm fix for 5a32993: handle sign extension correctly

9 years agocheck for partial matches at end of dverm
Alex Coyte [Wed, 16 Nov 2016 22:41:23 +0000 (09:41 +1100)] 
check for partial matches at end of dverm

9 years agogough: don't dump int data unless it's requested
Justin Viiret [Tue, 15 Nov 2016 23:56:37 +0000 (10:56 +1100)] 
gough: don't dump int data unless it's requested

9 years agoshufti: slightly faster short shufti operation
Matthew Barr [Tue, 13 Sep 2016 05:07:31 +0000 (15:07 +1000)] 
shufti: slightly faster short shufti operation

It is better to shift the high lane values in an XMM
before then using insert to combine the high and low lanes.

9 years agoFix combine2x128
Matthew Barr [Tue, 13 Sep 2016 05:07:16 +0000 (15:07 +1000)] 
Fix combine2x128

9 years agocorrect dump filenames of som rev engines
Alex Coyte [Thu, 3 Nov 2016 23:59:33 +0000 (10:59 +1100)] 
correct dump filenames of som rev engines

9 years agohave single dump function per engine
Alex Coyte [Tue, 1 Nov 2016 23:36:24 +0000 (10:36 +1100)] 
have single dump function per engine

9 years agonfa_api: remove subtype from dispatch
Alex Coyte [Thu, 27 Oct 2016 22:50:09 +0000 (09:50 +1100)] 
nfa_api: remove subtype from dispatch

9 years agoImplement some ue2_graph functions using TMP rather than friends
Alex Coyte [Thu, 15 Sep 2016 05:44:35 +0000 (15:44 +1000)] 
Implement some ue2_graph functions using TMP rather than friends

This helps work around issues with some compilers

9 years agoallow edge_descriptors to be created from pair<edge_descriptor, bool>
Alex Coyte [Tue, 30 Aug 2016 06:08:49 +0000 (16:08 +1000)] 
allow edge_descriptors to be created from pair<edge_descriptor, bool>

9 years agoIntroduce custom adjacency-list based graph
Alex Coyte [Wed, 24 Aug 2016 06:12:51 +0000 (16:12 +1000)] 
Introduce custom adjacency-list based graph

9 years agoremove unused define and old inlining controls
Alex Coyte [Thu, 27 Oct 2016 03:29:34 +0000 (14:29 +1100)] 
remove unused define and old inlining controls

9 years agouse stable_sort in analysis from 47f53f6; missed review comment
Alex Coyte [Thu, 27 Oct 2016 03:26:00 +0000 (14:26 +1100)] 
use stable_sort in analysis from 47f53f6; missed review comment

9 years agorose_dump: remove stray newline
Justin Viiret [Thu, 13 Oct 2016 22:14:28 +0000 (09:14 +1100)] 
rose_dump: remove stray newline

9 years agogetData256(): data needs to be 32-byte aligned
Justin Viiret [Wed, 12 Oct 2016 03:59:20 +0000 (14:59 +1100)] 
getData256(): data needs to be 32-byte aligned

9 years agosmallwrite: minimize DFAs if they have been pruned
Justin Viiret [Tue, 11 Oct 2016 04:36:16 +0000 (15:36 +1100)] 
smallwrite: minimize DFAs if they have been pruned

9 years agosmallwrite: prune overlong nfa graphs early
Justin Viiret [Tue, 11 Oct 2016 00:39:26 +0000 (11:39 +1100)] 
smallwrite: prune overlong nfa graphs early

9 years agong_limex: add edges in deterministic ordering
Justin Viiret [Tue, 11 Oct 2016 22:53:12 +0000 (09:53 +1100)] 
ng_limex: add edges in deterministic ordering

9 years agong_restructuring: wire start to tops in idx order
Justin Viiret [Tue, 11 Oct 2016 22:49:09 +0000 (09:49 +1100)] 
ng_restructuring: wire start to tops in idx order

9 years agong_equivalence: don't use ptr_vector
Justin Viiret [Tue, 11 Oct 2016 03:03:28 +0000 (14:03 +1100)] 
ng_equivalence: don't use ptr_vector

Switch over ptr_vector<T> to vector<unique_ptr<T>>. This works around
some issues we were seeing with MSVC builds, where the contents of the
ptr_vector were being destroyed when it was returned.

9 years agofix for analysis in previous commit
Alex Coyte [Thu, 6 Oct 2016 23:06:46 +0000 (10:06 +1100)] 
fix for analysis in previous commit

Properly distinguish between vertices that will get set after the cyclic
from vertices that may get set alongside the cyclic

9 years agosimple pass to pick up paths redundant with those from cyclic's succs
Alex Coyte [Thu, 6 Oct 2016 04:54:48 +0000 (15:54 +1100)] 
simple pass to pick up paths redundant with those from cyclic's succs

9 years agorose: call loadLongLiteralState() earlier
Justin Viiret [Thu, 29 Sep 2016 00:29:42 +0000 (10:29 +1000)] 
rose: call loadLongLiteralState() earlier

The ll_buf, ll_buf_nocase buffers must be initialised before anyh path
that could lead to storeLongLiteralState().

9 years agoproperly consider report behaviour when finding start verts
Alex Coyte [Thu, 29 Sep 2016 00:42:43 +0000 (10:42 +1000)] 
properly consider report behaviour when finding start verts

9 years agorose: don't unconditionally init ll_buf etc
Justin Viiret [Wed, 28 Sep 2016 07:17:58 +0000 (17:17 +1000)] 
rose: don't unconditionally init ll_buf etc

This is only necessary (and already always done) if there is a long
literal table.

9 years agoCreate combo tops for trigger limexes
Alex Coyte [Wed, 28 Sep 2016 03:57:24 +0000 (13:57 +1000)] 
Create combo tops for trigger limexes

9 years agoMerge master into develop
Matthew Barr [Fri, 2 Dec 2016 00:21:29 +0000 (11:21 +1100)] 
Merge master into develop

9 years agoBump version number for release v4.3.2
Matthew Barr [Mon, 14 Nov 2016 22:54:28 +0000 (09:54 +1100)] 
Bump version number for release

9 years agoUpdate changelog for 4.3.2
Matthew Barr [Mon, 14 Nov 2016 22:54:04 +0000 (09:54 +1100)] 
Update changelog for 4.3.2

9 years agoAdd the missing degree() in Boost 1.62
Matthew Barr [Wed, 19 Oct 2016 22:49:10 +0000 (09:49 +1100)] 
Add the missing degree() in Boost 1.62

This is a workaround that fixes issue #39

9 years agoremove unused includes
Alex Coyte [Wed, 28 Sep 2016 03:56:15 +0000 (13:56 +1000)] 
remove unused includes

9 years agofdr: reduce confirm size to a u8
Justin Viiret [Tue, 13 Sep 2016 05:52:39 +0000 (15:52 +1000)] 
fdr: reduce confirm size to a u8

Also removes the flexible array member from the LitInfo structure.

9 years agonoodle: correct history req calculation
Justin Viiret [Mon, 19 Sep 2016 01:23:37 +0000 (11:23 +1000)] 
noodle: correct history req calculation

9 years agorose: simplify long lit table, add bloom filter
Justin Viiret [Thu, 22 Sep 2016 03:58:42 +0000 (13:58 +1000)] 
rose: simplify long lit table, add bloom filter

Replaces the original long lit hash table (used in streaming mode) with a
smaller, simpler linear probing approach. Adds a bloom filter in front
of it to reduce time spent on false positives.

Sizing of both the hash table and bloom filter are done based on max
load.

9 years agofdr: move long literal handling into Rose
Justin Viiret [Wed, 7 Sep 2016 05:59:23 +0000 (15:59 +1000)] 
fdr: move long literal handling into Rose

Move the hash table used for long literal support in streaming mode from
FDR to Rose, and introduce new instructions CHECK_LONG_LIT and
CHECK_LONG_LIT_NOCASE for doing literal confirm for long literals.

This simplifies FDR confirm, and guarantees that HWLM matchers will only
be used for literals < 256 bytes long.

9 years agoDisable asserts everywhere when we say so
Matthew Barr [Thu, 15 Sep 2016 06:45:00 +0000 (16:45 +1000)] 
Disable asserts everywhere when we say so

9 years agoUE-3025: There is no need to prune tops from non-triggered graphs
Alex Coyte [Thu, 15 Sep 2016 01:22:29 +0000 (11:22 +1000)] 
UE-3025: There is no need to prune tops from non-triggered graphs

9 years agoextern "C" for mask1bit table
Matthew Barr [Wed, 14 Sep 2016 04:00:43 +0000 (14:00 +1000)] 
extern "C" for mask1bit table

9 years agoallow sets of tops on edges
Alex Coyte [Thu, 1 Sep 2016 04:58:55 +0000 (14:58 +1000)] 
allow sets of tops on edges

9 years agohinted insert operations for flat_set
Alex Coyte [Thu, 1 Sep 2016 04:40:17 +0000 (14:40 +1000)] 
hinted insert operations for flat_set

9 years agoOperator precedence matters
Matthew Barr [Wed, 7 Sep 2016 05:47:26 +0000 (15:47 +1000)] 
Operator precedence matters

9 years agoMSVC prefers the attrib at the beginning
Matthew Barr [Wed, 7 Sep 2016 01:50:00 +0000 (11:50 +1000)] 
MSVC prefers the attrib at the beginning

9 years agocmake: don't be so heavyhanded with flags
Matthew Barr [Wed, 7 Sep 2016 04:09:49 +0000 (14:09 +1000)] 
cmake: don't be so heavyhanded with flags

9 years agorose: move END instruction to start of enum
Justin Viiret [Tue, 13 Sep 2016 00:55:26 +0000 (10:55 +1000)] 
rose: move END instruction to start of enum

Stop overloading END as the last Rose interpreter instruction, use new
sentinel LAST_ROSE_INSTRUCTION for that.

This change will also make it easier to add new instructions without
renumbering END and thus changing all generated bytecodes.

9 years agorose: add CHECK_SINGLE_LOOKAROUND instruction
Xu, Chi [Mon, 5 Sep 2016 04:19:15 +0000 (12:19 +0800)] 
rose: add CHECK_SINGLE_LOOKAROUND instruction

This specialisation is cheaper than the shufti-based variants, so we
prefer it for single character class tests.

9 years agorose: enable generation of shufti32x16 case
Justin Viiret [Wed, 7 Sep 2016 00:33:44 +0000 (10:33 +1000)] 
rose: enable generation of shufti32x16 case

9 years agoremove code preventing firing callbacks in the history buffer
Alex Coyte [Wed, 31 Aug 2016 23:55:53 +0000 (09:55 +1000)] 
remove code preventing firing callbacks in the history buffer

9 years agoAdd short avx2 shufti form
Matthew Barr [Mon, 22 Aug 2016 05:59:32 +0000 (15:59 +1000)] 
Add short avx2 shufti form