]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
smallwrite: add report dedupe check
authorWang Xiang W <xiang.w.wang@intel.com>
Fri, 3 Apr 2020 16:08:10 +0000 (12:08 -0400)
committerHong, Yang A <yang.a.hong@intel.com>
Mon, 25 May 2020 13:46:57 +0000 (13:46 +0000)
src/rose/rose_build_dedupe.cpp

index 04144f5603020d85df34b3023d4fe865c9c35a4c..d5d002d43b365739bb5db5cd71a329cd36946803 100644 (file)
@@ -29,6 +29,7 @@
 #include "rose_build_impl.h"
 #include "nfa/castlecompile.h"
 #include "nfagraph/ng_repeat.h"
+#include "smallwrite/smallwrite_build.h"
 #include "util/compile_context.h"
 #include "util/boundary_reports.h"
 #include "util/make_unique.h"
@@ -159,6 +160,10 @@ RoseDedupeAuxImpl::RoseDedupeAuxImpl(const RoseBuildImpl &build_in)
         }
     }
 
+    for (const auto &report_id : build.smwr.all_reports()) {
+        live_reports.insert(report_id);
+    }
+
     // Collect live reports from boundary reports.
     insert(&live_reports, build.boundary.report_at_0);
     insert(&live_reports, build.boundary.report_at_0_eod);