]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #639 in SNORT/snort3 from hs_tl to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Tue, 27 Sep 2016 13:22:56 +0000 (09:22 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Tue, 27 Sep 2016 13:22:56 +0000 (09:22 -0400)
Squashed commit of the following:

commit 4f4f7fb4d5ced30a2de94186c93add9d66996d3a
Author: Russ Combs <rucombs@cisco.com>
Date:   Mon Sep 26 20:32:03 2016 -0400

    fix multithread hyperscan mpse

src/search_engines/hyperscan.cc

index 99b138d9e82d980e08828e10b66e0462d792e403..57153a531688e26a866532b888328f970597e7ba 100644 (file)
@@ -153,14 +153,17 @@ private:
 
     hs_database_t* hs_db = nullptr;
 
-    MpseMatch match_cb = nullptr;
-    void* match_ctx = nullptr;
+    static THREAD_LOCAL MpseMatch match_cb;
+    static THREAD_LOCAL void* match_ctx;
 
 public:
     static uint64_t instances;
     static uint64_t patterns;
 };
 
+THREAD_LOCAL MpseMatch HyperscanMpse::match_cb = nullptr;
+THREAD_LOCAL void* HyperscanMpse::match_ctx = nullptr;
+
 uint64_t HyperscanMpse::instances = 0;
 uint64_t HyperscanMpse::patterns = 0;