mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
LimEx NFA: no need to zero estate cache in STREAM
We believe that we have solved the issues that required zeroing of the exception state in STREAM_FN and REV_STREAM_FN nowadays.
This commit is contained in:
parent
01498fa8a5
commit
b5e290e985
@ -218,7 +218,8 @@ int PE_FN(STATE_ARG, ESTATE_ARG, u32 diffmask, STATE_T *succ,
|
||||
if (EQ_STATE(estate, LOAD_STATE(&ctx->cached_estate))) {
|
||||
DEBUG_PRINTF("using cached succ from previous state\n");
|
||||
STORE_STATE(succ, OR_STATE(LOAD_STATE(succ), LOAD_STATE(&ctx->cached_esucc)));
|
||||
if (ctx->cached_reports) {
|
||||
if (ctx->cached_reports && (flags & CALLBACK_OUTPUT)) {
|
||||
DEBUG_PRINTF("firing cached reports from previous state\n");
|
||||
if (unlikely(limexRunReports(ctx->cached_reports, ctx->callback,
|
||||
ctx->context, offset)
|
||||
== MO_HALT_MATCHING)) {
|
||||
|
@ -83,7 +83,8 @@ int processExceptional32(u32 s, u32 estate, UNUSED u32 diffmask, u32 *succ,
|
||||
if (estate == ctx->cached_estate) {
|
||||
DEBUG_PRINTF("using cached succ from previous state\n");
|
||||
*succ |= ctx->cached_esucc;
|
||||
if (ctx->cached_reports) {
|
||||
if (ctx->cached_reports && (flags & CALLBACK_OUTPUT)) {
|
||||
DEBUG_PRINTF("firing cached reports from previous state\n");
|
||||
if (unlikely(limexRunReports(ctx->cached_reports, ctx->callback,
|
||||
ctx->context, offset)
|
||||
== MO_HALT_MATCHING)) {
|
||||
|
@ -179,7 +179,6 @@ char STREAM_FN(const IMPL_NFA_T *limex, const u8 *input, size_t length,
|
||||
assert(ISALIGNED_CL(ctx));
|
||||
assert(ISALIGNED_CL(&ctx->s));
|
||||
STATE_T s = LOAD_STATE(&ctx->s);
|
||||
STORE_STATE(&ctx->cached_estate, ZERO_STATE); /* TODO: understand why this is required */
|
||||
|
||||
/* assert(ISALIGNED_16(exceptions)); */
|
||||
/* assert(ISALIGNED_16(reach)); */
|
||||
@ -305,7 +304,6 @@ char REV_STREAM_FN(const IMPL_NFA_T *limex, const u8 *input, size_t length,
|
||||
const ReportID *exReports = getExReports(limex);
|
||||
const u32 *exceptionMap = limex->exceptionMap;
|
||||
STATE_T s = LOAD_STATE(&ctx->s);
|
||||
STORE_STATE(&ctx->cached_estate, ZERO_STATE); /* TODO: understand why this is required */
|
||||
|
||||
/* assert(ISALIGNED_16(exceptions)); */
|
||||
/* assert(ISALIGNED_16(reach)); */
|
||||
|
Loading…
x
Reference in New Issue
Block a user