]> git.ipfire.org Git - thirdparty/vectorscan.git/log
thirdparty/vectorscan.git
9 years agorepeatStoreSparseOptimalP: make diff a u32
Justin Viiret [Tue, 10 Nov 2015 05:18:42 +0000 (16:18 +1100)] 
repeatStoreSparseOptimalP: make diff a u32

As delta is a u32, we know diff will always fit within a u32 as well.
Silences a warning from Coverity.

9 years agocmake: improve build paths for nested builds
Matthew Barr [Thu, 5 Nov 2015 03:49:04 +0000 (14:49 +1100)] 
cmake: improve build paths for nested builds

If Hyperscan is built as a subproject of another cmake project, it helps to
refer to PROJECT_xx_DIR instead of CMAKE_xx_DIR, etc.

9 years agoFix includes to meet our usual guidelines
Matthew Barr [Thu, 5 Nov 2015 03:46:07 +0000 (14:46 +1100)] 
Fix includes to meet our usual guidelines

9 years agoRefine ComponentClass::class_empty
Justin Viiret [Mon, 9 Nov 2015 01:59:36 +0000 (12:59 +1100)] 
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.

9 years agoDon't use class_empty in early class parsing
Justin Viiret [Mon, 9 Nov 2015 01:50:52 +0000 (12:50 +1100)] 
Don't use class_empty in early class parsing

Instead, explicitly track whether we're still in the early class parsing
machine.

9 years agoRemove dead ComponentClass::{get,set}FirstChar
Justin Viiret [Sun, 8 Nov 2015 23:49:19 +0000 (10:49 +1100)] 
Remove dead ComponentClass::{get,set}FirstChar

9 years agoRework parser rejection for POSIX collating elems
Justin Viiret [Sun, 8 Nov 2015 23:37:20 +0000 (10:37 +1100)] 
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.

9 years agodepth: correct sign in printf format
Justin Viiret [Tue, 3 Nov 2015 05:24:06 +0000 (16:24 +1100)] 
depth: correct sign in printf format

9 years agonfa_api_queue: debug printf format fix
Justin Viiret [Tue, 3 Nov 2015 05:23:27 +0000 (16:23 +1100)] 
nfa_api_queue: debug printf format fix

9 years agompv_dump: correct hex escapes in printf format
Justin Viiret [Tue, 3 Nov 2015 05:22:39 +0000 (16:22 +1100)] 
mpv_dump: correct hex escapes in printf format

9 years agosimplegrep: use correct sign in printf format
Justin Viiret [Tue, 3 Nov 2015 05:21:56 +0000 (16:21 +1100)] 
simplegrep: use correct sign in printf format

9 years agocompare: always use braces for for/if blocks
Justin Viiret [Tue, 3 Nov 2015 05:19:47 +0000 (16:19 +1100)] 
compare: always use braces for for/if blocks

9 years agolimex_dump: use 'override' keyword in subclass
Justin Viiret [Tue, 3 Nov 2015 05:13:12 +0000 (16:13 +1100)] 
limex_dump: use 'override' keyword in subclass

9 years agoNGWrapper: mark dtor with override
Justin Viiret [Tue, 3 Nov 2015 05:12:36 +0000 (16:12 +1100)] 
NGWrapper: mark dtor with override

9 years agoparser: use 'override' keyword in subclasses
Justin Viiret [Tue, 3 Nov 2015 05:11:56 +0000 (16:11 +1100)] 
parser: use 'override' keyword in subclasses

9 years agoAdd inlined sparseLastTop
Justin Viiret [Tue, 3 Nov 2015 04:17:17 +0000 (15:17 +1100)] 
Add inlined sparseLastTop

This allows the code to be inlined into other sparse optimal repeat
functions.

9 years agostoreInitialRingTopPatch: fix large delta bug
Justin Viiret [Tue, 3 Nov 2015 03:58:01 +0000 (14:58 +1100)] 
storeInitialRingTopPatch: fix large delta bug

Check for staleness up front, so that it is safe to use u32 values to
handle adding more tops.

Adds LargeGap unit tests.

9 years agorepeat: use u32 arithmetic explicitly
Justin Viiret [Tue, 3 Nov 2015 02:18:34 +0000 (13:18 +1100)] 
repeat: use u32 arithmetic explicitly

In some ring-based models, we know that if the ring is not stale, then
all our bounds should fit within 32-bits. This change makes these
explicitly u32 rather than implicitly narrowing later on.

9 years agorepeatRecurTable: no need for u64a return type
Justin Viiret [Mon, 2 Nov 2015 03:41:17 +0000 (14:41 +1100)] 
repeatRecurTable: no need for u64a return type

9 years agoOptimize max clique analysis
Xiang Wang [Thu, 29 Oct 2015 10:43:47 +0000 (06:43 -0400)] 
Optimize max clique analysis

Use vectors of state ids to avoid the overhead of subgraph copies

9 years agomove oversize graph check out of Automaton_holder ctor
Alex Coyte [Mon, 2 Nov 2015 03:36:43 +0000 (14:36 +1100)] 
move oversize graph check out of Automaton_holder ctor

9 years agoraw_som_dfa: initialize members in constructor
Alex Coyte [Mon, 2 Nov 2015 02:35:04 +0000 (13:35 +1100)] 
raw_som_dfa: initialize members in constructor

9 years agoLimEx NFA: unify flush br/estate behaviour
Justin Viiret [Mon, 2 Nov 2015 01:00:09 +0000 (12:00 +1100)] 
LimEx NFA: unify flush br/estate behaviour

Make the GPR NFA models only clear cached_estate conditionally based on
cached_br, as per the SIMD models.

9 years agoLimEx NFA: no need to zero estate cache in STREAM
Justin Viiret [Mon, 2 Nov 2015 00:57:55 +0000 (11:57 +1100)] 
LimEx NFA: no need to zero estate cache in STREAM

We believe that we have solved the issues that required zeroing of the
exception state in STREAM_FN and REV_STREAM_FN nowadays.

9 years agoLimEx NFA: no need to zero init cached_esucc
Justin Viiret [Sun, 1 Nov 2015 23:20:37 +0000 (10:20 +1100)] 
LimEx NFA: no need to zero init cached_esucc

All of the "exception cache" members are guarded by cached_esucc.

9 years agomake Automaton_Base ctor protected
Alex Coyte [Mon, 2 Nov 2015 00:22:51 +0000 (11:22 +1100)] 
make Automaton_Base ctor protected

Makes explicit that Automaton_Base is intended to be used as a only base class

9 years agoadd asserts to make bounds on alphaShift clear
Alex Coyte [Sun, 1 Nov 2015 23:28:31 +0000 (10:28 +1100)] 
add asserts to make bounds on alphaShift clear

9 years agodoComponent: make it obvious that a is never null
Alex Coyte [Fri, 30 Oct 2015 05:20:18 +0000 (16:20 +1100)] 
doComponent: make it obvious that a is never null

9 years agoRoseBuildImpl: init base_id members
Justin Viiret [Fri, 30 Oct 2015 04:10:03 +0000 (15:10 +1100)] 
RoseBuildImpl: init base_id members

These are set late in the Rose build process, when final IDs are
allocated.

9 years agoFDR compiler: assert that all models are < 32 bits
Justin Viiret [Fri, 30 Oct 2015 04:01:20 +0000 (15:01 +1100)] 
FDR compiler: assert that all models are < 32 bits

9 years agoInit filter members to nullptr
Justin Viiret [Thu, 29 Oct 2015 22:52:49 +0000 (09:52 +1100)] 
Init filter members to nullptr

Note that BGL filters must be default-constructible.

9 years agoAdd q_last_type() queue function
Justin Viiret [Thu, 29 Oct 2015 22:43:28 +0000 (09:43 +1100)] 
Add q_last_type() queue function

Analogous to q_cur_type(), asserts that queue indices are within a valid
range.

9 years agoassignStringsToBuckets: assert that there are lits
Justin Viiret [Thu, 29 Oct 2015 22:33:04 +0000 (09:33 +1100)] 
assignStringsToBuckets: assert that there are lits

9 years agoMerge develop into master v4.0.1
Matthew Barr [Fri, 30 Oct 2015 00:29:20 +0000 (11:29 +1100)] 
Merge develop into master

9 years agoBump version number
Matthew Barr [Fri, 30 Oct 2015 00:20:28 +0000 (11:20 +1100)] 
Bump version number

9 years agounit: Don't run unit-internal in release build
Matthew Barr [Fri, 30 Oct 2015 00:14:32 +0000 (11:14 +1100)] 
unit: Don't run unit-internal in release build

9 years agoRemove unneeded code at preproc stage
Matthew Barr [Thu, 29 Oct 2015 23:43:43 +0000 (10:43 +1100)] 
Remove unneeded code at preproc stage

If we know we have BMI2 we shouldn't produce the fallback code.

9 years agodocs: describe BOOST_ROOT cmake variable
Matthew Barr [Thu, 29 Oct 2015 06:29:24 +0000 (17:29 +1100)] 
docs: describe BOOST_ROOT cmake variable

9 years agocmake: collection of fixes
Matthew Barr [Thu, 29 Oct 2015 06:29:06 +0000 (17:29 +1100)] 
cmake: collection of fixes

9 years agoreduce memory use in ng_small_literal_set/ng_literal_decorated
Alex Coyte [Thu, 29 Oct 2015 03:35:02 +0000 (14:35 +1100)] 
reduce memory use in ng_small_literal_set/ng_literal_decorated

These passes kept temporary strings/paths alive longer than was needed which
lead to high memory usage during these passes in pathological cases.

9 years agoCheck for (and throw on) large min repeat
Justin Viiret [Wed, 28 Oct 2015 22:08:40 +0000 (09:08 +1100)] 
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.

9 years agoUpdate CMake required min version to 2.8.11
Matthew Barr [Mon, 26 Oct 2015 04:53:55 +0000 (15:53 +1100)] 
Update CMake required min version to 2.8.11

RedHat/CentOS 7 ship with 2.8.11 so this is a sane minimum.

9 years agoUnbreak unit-internal for builds w/o dump support
Justin Viiret [Tue, 20 Oct 2015 02:24:23 +0000 (13:24 +1100)] 
Unbreak unit-internal for builds w/o dump support

Use printable, rather than escapeString.

9 years agoRemove enum mqe_event and use u32 for queue events
Justin Viiret [Thu, 22 Oct 2015 23:59:48 +0000 (10:59 +1100)] 
Remove enum mqe_event and use u32 for queue events

We were using intermediate values int he enum and casting back and forth
with a u32; it is cleaner to just use a u32 and define some special
values.

Silences ICC warning #188: enumerated type mixed with another type.

9 years agoAllow no scratch for stream reset API calls
Justin Viiret [Fri, 23 Oct 2015 04:32:55 +0000 (15:32 +1100)] 
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.

9 years agoCustom NFA_API_NO_IMPL variant for zombie_status
Justin Viiret [Fri, 23 Oct 2015 00:39:31 +0000 (11:39 +1100)] 
Custom NFA_API_NO_IMPL variant for zombie_status

Silences ICC warning #188: enumerated type mixed with another type.

9 years agosidecar: use aligned_zmalloc_unique
Justin Viiret [Tue, 20 Oct 2015 03:37:15 +0000 (14:37 +1100)] 
sidecar: use aligned_zmalloc_unique

9 years agoFDRp tests: less raw malloc/free
Justin Viiret [Thu, 15 Oct 2015 05:08:51 +0000 (16:08 +1100)] 
FDRp tests: less raw malloc/free

9 years agoHyperscanScanGigabytesMatch: use a vector
Justin Viiret [Wed, 14 Oct 2015 01:38:13 +0000 (12:38 +1100)] 
HyperscanScanGigabytesMatch: use a vector

9 years agonfagraph_find_matches: simplify/cleanup
Justin Viiret [Mon, 12 Oct 2015 23:49:45 +0000 (10:49 +1100)] 
nfagraph_find_matches: simplify/cleanup

9 years agonfagraph_comp: use common constructGraph
Justin Viiret [Mon, 12 Oct 2015 23:16:54 +0000 (10:16 +1100)] 
nfagraph_comp: use common constructGraph

9 years agoInitial commit of Hyperscan v4.0.0
Matthew Barr [Mon, 19 Oct 2015 22:13:35 +0000 (09:13 +1100)] 
Initial commit of Hyperscan