47 Commits

Author SHA1 Message Date
Hong, Yang A
978105a4c0 klocwork: fix risk issues 2023-09-05 13:45:33 +03:00
Konstantinos Margaritis
66289cdacf fix ExpressionParser.cpp path 2023-03-22 11:36:06 +02:00
Konstantinos Margaritis
dbdbfe9473 Set Ragel.rl char type to unsigned, #135 2023-03-21 18:07:06 +00:00
Chang, Harry
31afacc7be Corpus editor: fix random char value of UTF-8. 2022-08-29 15:03:30 +03:00
Chang, Harry
a9ca0e4de3 Corpus generator: fix random char value of UTF-8.
fixes github issue #184
2022-08-29 15:03:26 +03:00
Konstantinos Margaritis
07ce6d8e7f fix build failures with clang on x86, make sure compilation works on other Power as well 2021-12-03 16:24:58 +02:00
Konstantinos Margaritis
08357a096c remove Windows/ICC support 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
e5050c9373 add missing compile flags 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
e35b88f2c8 use STL make_unique, remove wrapper header, breaks C++17 compilation 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
752a42419b fix IA32 build, as we need minimum SSSE3 support for compilation to succeed 2020-12-30 19:57:44 +02:00
Hong, Yang A
ec68facfaa hsbench: add hyphen support for -T option 2020-05-25 13:47:53 +00:00
Federico G. Schwindt
55f336751d Fix undefined behaviour
Just use stat and opendir.  Fixes #228.

While here correct the error message.
2020-05-25 13:47:53 +00: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
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
Lu, Qi
5a0885d235 Windows porting: port hyperscan and chimera tools to windows. 2018-07-09 11:40:43 -04:00
Chang, Harry
8a1c497f44 Logical Combination of patterns. 2018-06-27 14:04:57 +08:00
Matthew Barr
95c316afcc find_matches: don't create ridiculous accept paths 2018-01-19 06:20:37 -05:00
Matthew Barr
4fc11cfc65 Hamming: GraphTruth and corpus gen support 2018-01-19 06:12:28 -05:00
Matthew Barr
1891f14755 Add support for Hamming distance approx matching 2018-01-19 06:11:43 -05:00
Matthew Barr
56ec2dfc4a Remove out of date debug output 2017-08-21 11:23:41 +10:00
Matthew Barr
b8753e3daf clean up loops and add AVX-512 2017-08-21 11:20:22 +10:00
Matthew Barr
9d5a00bde1 Open input path once using file descriptor 2017-08-21 11:20:22 +10:00
Matthew Barr
30f93634b8 use string equality operator 2017-08-21 11:19:20 +10:00
Justin Viiret
9cf66b6ac9 util: switch from Boost to std::unordered set/map
This commit replaces the ue2::unordered_{set,map} types with their STL
versions, with some new hashing utilities in util/hash.h. The new types
ue2_unordered_set<T> and ue2_unordered_map<Key, T> default to using the
ue2_hasher.

The header util/ue2_containers.h has been removed, and the flat_set/map
containers moved to util/flat_containers.h.
2017-08-21 11:14:55 +10:00
Justin Viiret
bc232d272f ng_find_matches: speed up edge lookups
Improves the performance of step() on graphs with vertices with large
degree.
2017-08-21 11:12:36 +10:00
Matthew Barr
dba2470ec9 msvc: use the vectorcall calling convention
This requires declaring external interfaces with the cdecl
calling convention.
2017-06-09 10:12:02 +10:00
Justin Viiret
083d84cfd6 expressions: add much faster limitToSignatures() 2017-05-30 13:49:24 +10:00
Justin Viiret
5dfae12a62 ng: split NGWrapper into NGHolder, ExpressionInfo
We now use NGHolder for all graph information, while other expression
properties (report, flag information, etc) go in new class
ExpressionInfo.
2017-04-26 15:18:09 +10:00
Justin Viiret
2d660ce4db ng_corpus_generator: small fix for MSVC compat 2017-04-26 15:17:11 +10:00
Justin Viiret
3e597e85ff ng_corpus_generator: restore use of boost::next()
libc++ checks for forward_iterator_tag in std::next(), which isn't
provided by our (Boost-derived) ue2_graph iterators.
2017-04-26 15:17:03 +10:00
Justin Viiret
26ec7dd332 ng_corpus_generator: use std::next, not boost::next 2017-04-26 15:17:03 +10:00
Justin Viiret
037e39b6f5 ng_corpus_generator: stop using ptr_vector
Nowadays we can use vector<unique_ptr<T>>.
2017-04-26 15:17:03 +10:00
Justin Viiret
834aebe8b6 ng_find_matches: use wd.active for accepts too 2017-04-26 15:17:03 +10:00
Justin Viiret
bae8ebc62d ng_find_matches: speed up gather...ByDepth 2017-04-26 15:17:03 +10:00
Justin Viiret
749e3e64b9 getMatches: simplify 2017-04-26 15:17:03 +10:00
Justin Viiret
c81c30b144 findMatches: persist working data 2017-04-26 15:17:03 +10:00
Justin Viiret
cc1191d94c getSuccessors: reuse a vector<State> for output 2017-04-26 15:17:03 +10:00
Justin Viiret
7ad21500c4 getActiveStates: return a sorted, uniqued vector 2017-04-26 15:17:03 +10:00
Justin Viiret
7ca81ff530 ng_find_matches: limit how big we're willing to go
Tests which require tracking more than 15K states (including edit
distance states) are very, very slow.
2017-04-26 15:16:22 +10:00
Anatoly Burakov
4c2b7cc04f Add support for approximate matching in ue2collider 2017-04-26 15:11:51 +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
Matthew Barr
f626276271 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.
2016-12-14 15:26:01 +11:00
Alex Coyte
e1e9010cac Introduce custom adjacency-list based graph 2016-12-02 11:31:33 +11:00
Alex Coyte
691b08d170 use NGHolder::foo in favour of NFAGraph::foo 2016-08-10 14:52:56 +10:00
Matthew Barr
3dc8bab78f Build convenience libraries as static libs 2016-04-20 13:34:55 +10:00
Justin Viiret
5dd4aa9c13 ng_find_matches: Simplify and improve performance
Improve performance by using bitsets rather than sets of vertex
indices.
2016-04-20 13:34:55 +10:00
Matthew Barr
904e436f11 Initial commit of Hyperscan 2015-10-20 09:13:35 +11:00