]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
safety assertions for delayed rebuild
authorJustin Viiret <justin.viiret@intel.com>
Tue, 31 Jan 2017 23:50:44 +0000 (10:50 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 26 Apr 2017 04:56:49 +0000 (14:56 +1000)
src/rose/rose_build_matchers.cpp

index b92941d7e1d43f8c086c6f9f5c270cea68de9e3c..cd88c9807df5e462a0296ba743dad4600dbec281 100644 (file)
@@ -650,6 +650,11 @@ MatcherProto makeMatcherProto(const RoseBuildImpl &build,
                               size_t max_len, u32 max_offset) {
     MatcherProto mp;
 
+    if (delay_rebuild) {
+        assert(table == ROSE_FLOATING);
+        assert(build.cc.streaming);
+    }
+
     for (const auto &e : build.literals.right) {
         const u32 id = e.first;
         if (!build.hasFinalId(id)) {