mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
roseSuffixesEod: trust the queue structure
This commit is contained in:
parent
3e0232f0d6
commit
d9bd6d5dee
@ -859,32 +859,25 @@ hwlmcb_rv_t roseSuffixesEod(const struct RoseEngine *rose,
|
||||
|
||||
for (u32 qi = mmbit_iterate(aa, aaCount, MMB_INVALID); qi != MMB_INVALID;
|
||||
qi = mmbit_iterate(aa, aaCount, qi)) {
|
||||
const struct NfaInfo *info = getNfaInfoByQueue(rose, qi);
|
||||
const struct NFA *nfa = getNfaByInfo(rose, info);
|
||||
|
||||
assert(nfaAcceptsEod(nfa));
|
||||
|
||||
DEBUG_PRINTF("checking nfa %u\n", qi);
|
||||
struct mq *q = scratch->queues + qi;
|
||||
assert(q->nfa == getNfaByQueue(rose, qi));
|
||||
assert(nfaAcceptsEod(q->nfa));
|
||||
|
||||
/* We have just been triggered. */
|
||||
assert(fatbit_isset(scratch->aqa, rose->queueCount, qi));
|
||||
|
||||
char *fstate = scratch->fullState + info->fullStateOffset;
|
||||
const char *sstate = scratch->core_info.state + info->stateOffset;
|
||||
|
||||
struct mq *q = scratch->queues + qi;
|
||||
|
||||
pushQueueNoMerge(q, MQE_END, scratch->core_info.len);
|
||||
|
||||
q->context = NULL;
|
||||
|
||||
/* rose exec is used as we don't want to / can't raise matches in the
|
||||
* history buffer. */
|
||||
if (!nfaQueueExecRose(q->nfa, q, MO_INVALID_IDX)) {
|
||||
DEBUG_PRINTF("nfa is dead\n");
|
||||
continue;
|
||||
}
|
||||
if (nfaCheckFinalState(nfa, fstate, sstate, offset, roseReportAdaptor,
|
||||
roseReportSomAdaptor,
|
||||
if (nfaCheckFinalState(q->nfa, q->state, q->streamState, offset,
|
||||
roseReportAdaptor, roseReportSomAdaptor,
|
||||
scratch) == MO_HALT_MATCHING) {
|
||||
DEBUG_PRINTF("user instructed us to stop\n");
|
||||
return HWLM_TERMINATE_MATCHING;
|
||||
|
Loading…
x
Reference in New Issue
Block a user