]> git.ipfire.org Git - thirdparty/vectorscan.git/log
thirdparty/vectorscan.git
9 years agoUse SOURCE_DATE_EPOCH for timestamp if present
Matthew Barr [Wed, 10 Aug 2016 01:14:54 +0000 (11:14 +1000)] 
Use SOURCE_DATE_EPOCH for timestamp if present

The Debian reproducible builds effort suggests using
this environment variable for timestamps.

9 years agounit: Disable warnings
Matthew Barr [Mon, 18 Jul 2016 23:28:46 +0000 (09:28 +1000)] 
unit: Disable warnings

9 years agoGCC 6 warns about unused attributes - disable the warning
Matthew Barr [Mon, 18 Jul 2016 23:23:57 +0000 (09:23 +1000)] 
GCC 6 warns about unused attributes - disable the warning

9 years agocmake: take control of our compiler flags
Matthew Barr [Tue, 28 Jun 2016 01:59:14 +0000 (11:59 +1000)] 
cmake: take control of our compiler flags

9 years agorose: use min of max_offset in left merges
Justin Viiret [Tue, 9 Aug 2016 04:38:58 +0000 (14:38 +1000)] 
rose: use min of max_offset in left merges

Be more careful with max_offset, since we rely on it ofr ANCH history
cases. Also adds tighter assertions.

9 years agorose: ensure anch small block literals have bounds
Justin Viiret [Tue, 9 Aug 2016 05:53:21 +0000 (15:53 +1000)] 
rose: ensure anch small block literals have bounds

9 years agoprogram_runtime: remove commented-out code
Justin Viiret [Thu, 4 Aug 2016 00:40:35 +0000 (10:40 +1000)] 
program_runtime: remove commented-out code

9 years agodfa_build_strat: remove dead pure virtual impl
Justin Viiret [Thu, 4 Aug 2016 00:36:09 +0000 (10:36 +1000)] 
dfa_build_strat: remove dead pure virtual impl

9 years agoremove exceptionMap from LimExNFA
Alex Coyte [Wed, 3 Aug 2016 04:41:34 +0000 (14:41 +1000)] 
remove exceptionMap from LimExNFA

9 years agodfa: adding new Sheng engine
Anatoly Burakov [Thu, 10 Mar 2016 09:57:41 +0000 (09:57 +0000)] 
dfa: adding new Sheng engine

A new shuffle-based DFA engine, complete with acceleration and smallwrite.

9 years agoMcClellan refactor
Anatoly Burakov [Thu, 19 May 2016 13:16:35 +0000 (14:16 +0100)] 
McClellan refactor

Taking dfa strat out of McClellan, to be reused by other DFAs

9 years agonfa: delete largely-unused struct LimExNFABase
Justin Viiret [Tue, 2 Aug 2016 04:49:38 +0000 (14:49 +1000)] 
nfa: delete largely-unused struct LimExNFABase

9 years agoadd a csv version of rose_components
Alex Coyte [Mon, 1 Aug 2016 02:43:13 +0000 (12:43 +1000)] 
add a csv version of rose_components

9 years agoCheck for misaligned memory in compile error code
Matthew Barr [Wed, 27 Jul 2016 06:55:28 +0000 (16:55 +1000)] 
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.

9 years agorose: don't leave stray reports when copying the subgraph leading to a report
Alex Coyte [Fri, 29 Jul 2016 05:47:55 +0000 (15:47 +1000)] 
rose: don't leave stray reports when copying the subgraph leading to a report

9 years agodump: offsets for SOM_REL, SOM_ABS reports
Justin Viiret [Mon, 25 Jul 2016 23:45:57 +0000 (09:45 +1000)] 
dump: offsets for SOM_REL, SOM_ABS reports

9 years agoparser: ignore \E that is not preceded by \Q
Justin Viiret [Thu, 28 Jul 2016 02:38:26 +0000 (12:38 +1000)] 
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.

9 years agong_violet: fix non-det in lookForCleanEarlySplits
Justin Viiret [Wed, 27 Jul 2016 01:19:58 +0000 (11:19 +1000)] 
ng_violet: fix non-det in lookForCleanEarlySplits

9 years agong_violet: trivial typo fixes
Justin Viiret [Wed, 27 Jul 2016 00:42:46 +0000 (10:42 +1000)] 
ng_violet: trivial typo fixes

9 years agong_violet: fix non-determinism in deanchorIfNeeded
Justin Viiret [Wed, 27 Jul 2016 00:23:42 +0000 (10:23 +1000)] 
ng_violet: fix non-determinism in deanchorIfNeeded

9 years agong_violet: fix non-determinism in splitEdgesByCut
Justin Viiret [Tue, 26 Jul 2016 23:29:39 +0000 (09:29 +1000)] 
ng_violet: fix non-determinism in splitEdgesByCut

9 years agoOlder gcc doesn't like shadowing the function
Matthew Barr [Mon, 25 Jul 2016 06:24:30 +0000 (16:24 +1000)] 
Older gcc doesn't like shadowing the function

9 years agoRemove enum typedef
Matthew Barr [Mon, 25 Jul 2016 06:06:37 +0000 (16:06 +1000)] 
Remove enum typedef

9 years agoDon't shadow names
Matthew Barr [Mon, 25 Jul 2016 05:33:40 +0000 (15:33 +1000)] 
Don't shadow names

9 years agong_violet: det. vertex ordering in splitRoseEdge
Justin Viiret [Thu, 21 Jul 2016 04:22:05 +0000 (14:22 +1000)] 
ng_violet: det. vertex ordering in splitRoseEdge

9 years agong_violet: iterate in edge order
Justin Viiret [Thu, 21 Jul 2016 02:57:12 +0000 (12:57 +1000)] 
ng_violet: iterate in edge order

9 years agorose: use dumpString for debug output
Justin Viiret [Thu, 21 Jul 2016 03:32:55 +0000 (13:32 +1000)] 
rose: use dumpString for debug output

9 years agoflood_compile: escape chars in debugging
Justin Viiret [Thu, 21 Jul 2016 03:25:26 +0000 (13:25 +1000)] 
flood_compile: escape chars in debugging

9 years agong_violet: use dumpString for debug output
Justin Viiret [Thu, 21 Jul 2016 02:46:07 +0000 (12:46 +1000)] 
ng_violet: use dumpString for debug output

9 years agorose: clear reports in removeFalsePaths
Justin Viiret [Thu, 21 Jul 2016 00:33:21 +0000 (10:33 +1000)] 
rose: clear reports in removeFalsePaths

9 years agorose: only write out report programs if in use
Justin Viiret [Thu, 14 Jul 2016 06:17:06 +0000 (16:17 +1000)] 
rose: only write out report programs if in use

These programs are only used by output-exposed engines.

9 years agong: ensure that only match states have reports
Justin Viiret [Mon, 18 Jul 2016 02:41:31 +0000 (12:41 +1000)] 
ng: ensure that only match states have reports

Ensure (and assert) that vertices without an edge to {accept, acceptEod}
do not have reports set.

9 years agoteddy: apply poison mask after prep_conf_ work
Justin Viiret [Mon, 18 Jul 2016 01:32:18 +0000 (11:32 +1000)] 
teddy: apply poison mask after prep_conf_ work

This simplifies the code, and removes all the all-ones p_mask uses,
which we were otherwise trusting the optimizer to remove.

9 years agotake mask overhang into account for hwlm accel, float min dist
Alex Coyte [Mon, 18 Jul 2016 01:33:13 +0000 (11:33 +1000)] 
take mask overhang into account for hwlm accel, float min dist

9 years agoviolet: 32bit fix
Alex Coyte [Fri, 15 Jul 2016 04:32:21 +0000 (14:32 +1000)] 
violet: 32bit fix

9 years agoviolet: initial implementation
Alex Coyte [Fri, 15 Jul 2016 03:07:00 +0000 (13:07 +1000)] 
violet: initial implementation

9 years agocompiledump: allow disabling of early graphs for large compiles
Alex Coyte [Wed, 29 Jun 2016 23:57:18 +0000 (09:57 +1000)] 
compiledump: allow disabling of early graphs for large compiles

9 years agorose: expose smwr builder, tidy up engine build
Justin Viiret [Thu, 14 Jul 2016 23:50:08 +0000 (09:50 +1000)] 
rose: expose smwr builder, tidy up engine build

9 years agorose_build_anchored: clean up remapping
Justin Viiret [Thu, 14 Jul 2016 03:34:56 +0000 (13:34 +1000)] 
rose_build_anchored: clean up remapping

Note that there are no EOD reports in the anchored matcher raw_dfas.

9 years agorose_build_anchored: remove unused forward decls
Justin Viiret [Thu, 14 Jul 2016 01:50:23 +0000 (11:50 +1000)] 
rose_build_anchored: remove unused forward decls

9 years agorose: use program offset, not final_id, in atable
Justin Viiret [Thu, 14 Jul 2016 01:40:49 +0000 (11:40 +1000)] 
rose: use program offset, not final_id, in atable

This removes the need to look up the program offset in a table when
handling an anchored literal match.

9 years agorose: add RECORD_ANCHORED instruction to program
Justin Viiret [Thu, 14 Jul 2016 00:05:47 +0000 (10:05 +1000)] 
rose: add RECORD_ANCHORED instruction to program

Moves recordAnchoredLiteralMatch from an unconditional call in the
anchored callback to being driven by a program instruction.

9 years agominor eager prefixes improvements
Alex Coyte [Tue, 12 Jul 2016 04:01:51 +0000 (14:01 +1000)] 
minor eager prefixes improvements
 - count eager prefixes as always run engine when comparing with smwr
 - only check if a prefix is vacuous after adding back literal fragments

9 years agoUE-2991: avoid copying one unnecessary subqueue item
Xiang Wang [Mon, 11 Jul 2016 14:08:40 +0000 (10:08 -0400)] 
UE-2991: avoid copying one unnecessary subqueue item

9 years agorose: tidy up CHECK_{BYTE,MASK} dump code
Justin Viiret [Mon, 11 Jul 2016 04:42:23 +0000 (14:42 +1000)] 
rose: tidy up CHECK_{BYTE,MASK} dump code

9 years agorose: add CHECK_BYTE/CHECK_MASK instructions
Xu, Chi [Fri, 13 May 2016 00:52:43 +0000 (08:52 +0800)] 
rose: add CHECK_BYTE/CHECK_MASK instructions

These instructions are specialisations of the "lookaround" code for
performance.

9 years agorose_build_convert: improve history selection
Justin Viiret [Mon, 11 Jul 2016 23:36:49 +0000 (09:36 +1000)] 
rose_build_convert: improve history selection

Fixes assertion failures introduced by last commit.

9 years agorose: sanity check CHECK_BOUNDS instruction
Justin Viiret [Mon, 11 Jul 2016 01:40:32 +0000 (11:40 +1000)] 
rose: sanity check CHECK_BOUNDS instruction

9 years agorose: only use anch history when there are bounds
Justin Viiret [Mon, 11 Jul 2016 01:44:57 +0000 (11:44 +1000)] 
rose: only use anch history when there are bounds

9 years agotamarama dump: use correct base offset
Alex Coyte [Thu, 30 Jun 2016 01:32:24 +0000 (11:32 +1000)] 
tamarama dump: use correct base offset

9 years agorose: only dump small-block table in block mode
Justin Viiret [Fri, 8 Jul 2016 01:36:10 +0000 (11:36 +1000)] 
rose: only dump small-block table in block mode

9 years agorose: check literal bounds when building SB table
Justin Viiret [Thu, 7 Jul 2016 00:25:49 +0000 (10:25 +1000)] 
rose: check literal bounds when building SB table

Literals that cannot lead to a report in the first ROSE_SMALL_BLOCK_LEN
bytes may be dropped from the small block table.

9 years agofdr: remove groups from struct FDR_Runtime_Args
Justin Viiret [Thu, 7 Jul 2016 02:53:09 +0000 (12:53 +1000)] 
fdr: remove groups from struct FDR_Runtime_Args

9 years agoteddy: no need to write control out at the end
Justin Viiret [Tue, 5 Jul 2016 23:26:42 +0000 (09:26 +1000)] 
teddy: no need to write control out at the end

9 years agoteddy: remove extra control ptr
Justin Viiret [Tue, 5 Jul 2016 23:22:31 +0000 (09:22 +1000)] 
teddy: remove extra control ptr

9 years agofdr: remove extra control ptr
Justin Viiret [Tue, 5 Jul 2016 06:36:04 +0000 (16:36 +1000)] 
fdr: remove extra control ptr

9 years agosimd_utils: setbit/clearbit by loading 1-bit mask
Justin Viiret [Thu, 12 May 2016 23:39:26 +0000 (09:39 +1000)] 
simd_utils: setbit/clearbit by loading 1-bit mask

9 years agorose: don't always dedupe small-block lit variants
Justin Viiret [Wed, 6 Jul 2016 05:49:03 +0000 (15:49 +1000)] 
rose: don't always dedupe small-block lit variants

9 years agoreduce character classes for hwlm accel
Alex Coyte [Fri, 1 Jul 2016 04:04:55 +0000 (14:04 +1000)] 
reduce character classes for hwlm accel

9 years agotruffle hwlm accel
Alex Coyte [Wed, 29 Jun 2016 23:50:08 +0000 (09:50 +1000)] 
truffle hwlm accel

9 years agouse NGHolder::foo in favour of NFAGraph::foo
Alex Coyte [Thu, 7 Jul 2016 04:07:12 +0000 (14:07 +1000)] 
use NGHolder::foo in favour of NFAGraph::foo

9 years agowe no longer store the history len
Alex Coyte [Thu, 18 Jun 2015 04:55:34 +0000 (14:55 +1000)] 
we no longer store the history len

9 years agogroup_weak_end is no longer used
Alex Coyte [Thu, 7 Jul 2016 01:36:05 +0000 (11:36 +1000)] 
group_weak_end is no longer used

9 years agoEnsure that m256 is 32-aligned on non-avx2 builds
Matthew Barr [Thu, 7 Jul 2016 04:00:11 +0000 (14:00 +1000)] 
Ensure that m256 is 32-aligned on non-avx2 builds

9 years agorose: use normal callback for pure-literal cases
Justin Viiret [Tue, 5 Jul 2016 04:37:22 +0000 (14:37 +1000)] 
rose: use normal callback for pure-literal cases

9 years agolimex: use cyclics mask for repeat compress
Justin Viiret [Mon, 4 Jul 2016 04:19:10 +0000 (14:19 +1000)] 
limex: use cyclics mask for repeat compress

9 years agolimex: only compress active repeats
Justin Viiret [Mon, 4 Jul 2016 02:56:03 +0000 (12:56 +1000)] 
limex: only compress active repeats

9 years agolimex: switch off stale repeats during compress
Justin Viiret [Mon, 4 Jul 2016 02:41:25 +0000 (12:41 +1000)] 
limex: switch off stale repeats during compress

9 years agolimex: compress repeats before state
Justin Viiret [Mon, 4 Jul 2016 01:27:21 +0000 (11:27 +1000)] 
limex: compress repeats before state

9 years agoassign groups: turn pair<pair> into a tuple
Justin Viiret [Thu, 2 Jun 2016 04:19:30 +0000 (14:19 +1000)] 
assign groups: turn pair<pair> into a tuple

9 years agorose: preserve lit properties when building masks
Justin Viiret [Thu, 2 Jun 2016 00:55:22 +0000 (10:55 +1000)] 
rose: preserve lit properties when building masks

This fixes a bug with commit 6a6b0e5, which did not preserve the
requires_explode and requires_benefits properties when a new literal was
generated to add an HWLM and/cmp mask.

Also extends the requires_explode handling to allow masked literals.

9 years agonew test: deserializers fail with garbage input
Boris Nagaev [Sun, 29 May 2016 09:29:13 +0000 (12:29 +0300)] 
new test: deserializers fail with garbage input

9 years agohs_serialized_database_info: check whole input
Boris Nagaev [Sun, 29 May 2016 09:27:11 +0000 (12:27 +0300)] 
hs_serialized_database_info: check whole input

Most lines of hs_serialized_database_info are not needed,
as the information is provided by db_decode_header.
Moreover, db_decode_header changes its first argument,
so it points to end of header after db_decode_header.

9 years agosimplegrep: open file in binary mode ("rb")
Boris Nagaev [Fri, 3 Jun 2016 23:29:26 +0000 (02:29 +0300)] 
simplegrep: open file in binary mode ("rb")

Otherwise it hangs on binary files (platform MinGW).

9 years agoworkaround for freebsd/clang/libc++ build issues
Justin Viiret [Fri, 24 Jun 2016 01:30:07 +0000 (11:30 +1000)] 
workaround for freebsd/clang/libc++ build issues

Rather than relying on set's constructor from {}, explicitly construct
the set.

9 years agoApply some consistency to the names we give shifts
Matthew Barr [Wed, 15 Jun 2016 01:02:42 +0000 (11:02 +1000)] 
Apply some consistency to the names we give shifts

9 years agoremove unnecessary function proto
Matthew Barr [Tue, 14 Jun 2016 01:28:00 +0000 (11:28 +1000)] 
remove unnecessary function proto

9 years agoremove only use of cmpmsk8 and unused cmpmsk16
Matthew Barr [Tue, 14 Jun 2016 01:21:48 +0000 (11:21 +1000)] 
remove only use of cmpmsk8 and unused cmpmsk16

9 years agoRemove GCC-style compound statements
Matthew Barr [Tue, 7 Jun 2016 05:45:53 +0000 (15:45 +1000)] 
Remove GCC-style compound statements

These do not appear to give us benefits over inlining on recent compilers.

9 years agoteddy: we only need the upper lane
Matthew Barr [Tue, 7 Jun 2016 05:44:39 +0000 (15:44 +1000)] 
teddy: we only need the upper lane

Just use an extract, no need to shuffle first.

9 years agosimd: simplify the set-all-ones util funcs
Matthew Barr [Mon, 6 Jun 2016 06:24:55 +0000 (16:24 +1000)] 
simd: simplify the set-all-ones util funcs

Modern compilers (gcc, icc) get this right, with the benefit of
removing our last use of inline asm in this file.

9 years agoMove limex specific shuffle utils and ssse3 funcs
Matthew Barr [Mon, 6 Jun 2016 01:54:21 +0000 (11:54 +1000)] 
Move limex specific shuffle utils and ssse3 funcs

9 years agonfa: standardise callback start, end naming
Justin Viiret [Wed, 29 Jun 2016 05:04:40 +0000 (15:04 +1000)] 
nfa: standardise callback start, end naming

9 years agonfa: unify NfaCallback and SomNfaCallback
Justin Viiret [Fri, 24 Jun 2016 06:22:43 +0000 (16:22 +1000)] 
nfa: unify NfaCallback and SomNfaCallback

Use just one callback type, with both start and end offsets.

9 years agotamarama: add container engine for exclusive nfas
Xiang Wang [Tue, 11 Aug 2015 09:23:12 +0000 (05:23 -0400)] 
tamarama: add container engine for exclusive nfas

Add the new Tamarama engine that acts as a container for infix/suffix
engines that can be proven to run exclusively of one another.

This reduces stream state for pattern sets with many exclusive engines.

9 years agorose: re-inline literal handling program exec
Justin Viiret [Mon, 27 Jun 2016 02:48:46 +0000 (12:48 +1000)] 
rose: re-inline literal handling program exec

9 years agorose: move roseRunProgram into its own unit
Justin Viiret [Wed, 22 Jun 2016 06:23:36 +0000 (16:23 +1000)] 
rose: move roseRunProgram into its own unit

The roseRunProgram function had gotten very large for the number of
sites it was being inlined into, with negative effects on performance in
large cases. This change moves it into its own translation unit.

9 years agoallow some prefixes that may squash the literal match to run eagerly
Alex Coyte [Thu, 23 Jun 2016 23:28:42 +0000 (09:28 +1000)] 
allow some prefixes that may squash the literal match to run eagerly

9 years agoDisable strict aliasing
Matthew Barr [Wed, 22 Jun 2016 05:03:22 +0000 (15:03 +1000)] 
Disable strict aliasing

Strict aliasing allows to compiler to make some optimisations, but they aren't
without risk. The benefits do not appear to be worth the risk.

9 years agoprevent merging the e and f tables if the ftable is squashable
Alex Coyte [Thu, 23 Jun 2016 04:01:55 +0000 (14:01 +1000)] 
prevent merging the e and f tables if the ftable is squashable

9 years ago only show floating groups to the floating table
Alex Coyte [Thu, 23 Jun 2016 03:14:39 +0000 (13:14 +1000)] 
only show floating groups to the floating table

9 years agorole aliasing: tidy up naming
Justin Viiret [Thu, 23 Jun 2016 01:14:34 +0000 (11:14 +1000)] 
role aliasing: tidy up naming

9 years agorole aliasing: unify map update code
Justin Viiret [Thu, 23 Jun 2016 01:07:39 +0000 (11:07 +1000)] 
role aliasing: unify map update code

9 years agorose: don't build empty sparse iter subprograms
Justin Viiret [Mon, 20 Jun 2016 06:38:03 +0000 (16:38 +1000)] 
rose: don't build empty sparse iter subprograms

9 years agorole aliasing: use a reverse ghost map
Justin Viiret [Mon, 20 Jun 2016 04:56:14 +0000 (14:56 +1000)] 
role aliasing: use a reverse ghost map

9 years agotighten ghost vertex checks
Justin Viiret [Mon, 20 Jun 2016 00:37:22 +0000 (10:37 +1000)] 
tighten ghost vertex checks

9 years agorose: allow ghosts to be aliased
Justin Viiret [Mon, 20 Jun 2016 00:17:38 +0000 (10:17 +1000)] 
rose: allow ghosts to be aliased

9 years agolimex: tidy up scoring code
Justin Viiret [Tue, 21 Jun 2016 02:53:13 +0000 (12:53 +1000)] 
limex: tidy up scoring code

9 years agolimex: invert scoring to count up from zero
Justin Viiret [Tue, 21 Jun 2016 02:48:54 +0000 (12:48 +1000)] 
limex: invert scoring to count up from zero

9 years agolimex: implement variable shift NFA engines
Kirill Rybalchenko [Thu, 21 Apr 2016 15:52:43 +0000 (16:52 +0100)] 
limex: implement variable shift NFA engines

Replaces the old LimEx NFA engines, which were specialised for model
size and number of shifts, with a new set of engines that can handle a
variable number of shifts.