From: Wang Xiang W Date: Fri, 3 Apr 2020 16:08:10 +0000 (-0400) Subject: smallwrite: add report dedupe check X-Git-Tag: v5.3.0^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c4490cfc9dbee7e95c9d80c54be57e91f63cd67;p=thirdparty%2Fvectorscan.git smallwrite: add report dedupe check --- diff --git a/src/rose/rose_build_dedupe.cpp b/src/rose/rose_build_dedupe.cpp index 04144f56..d5d002d4 100644 --- a/src/rose/rose_build_dedupe.cpp +++ b/src/rose/rose_build_dedupe.cpp @@ -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);