From: Justin Viiret Date: Mon, 2 Nov 2015 01:00:09 +0000 (+1100) Subject: LimEx NFA: unify flush br/estate behaviour X-Git-Tag: v4.1.0^2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4311775b436430a9f5a724eee2a78d2fc8101e57;p=thirdparty%2Fvectorscan.git LimEx NFA: unify flush br/estate behaviour Make the GPR NFA models only clear cached_estate conditionally based on cached_br, as per the SIMD models. --- diff --git a/src/nfa/limex_native.c b/src/nfa/limex_native.c index 49c10199..471e4bf0 100644 --- a/src/nfa/limex_native.c +++ b/src/nfa/limex_native.c @@ -120,7 +120,9 @@ int processExceptional32(u32 s, u32 estate, UNUSED u32 diffmask, u32 *succ, ctx->cached_reports = new_cache.reports; ctx->cached_br = new_cache.br; } else if (cacheable == DO_NOT_CACHE_RESULT_AND_FLUSH_BR_ENTRIES) { - ctx->cached_estate = 0U; + if (ctx->cached_br) { + ctx->cached_estate = 0U; + } } return 0;