Jenkins-1080: fixed error reporting logical combination match in "A&!B" type by

moving flush_comb behind report_eod_matches in hs_close_stream/hs_reset_stream.
This commit is contained in:
Chang, Harry 2018-08-08 14:44:01 +08:00
parent 8a0e4f8249
commit 62dfd48d53

View File

@ -934,12 +934,6 @@ hs_error_t hs_scan_stream_internal(hs_stream_t *id, const char *data,
}
}
if (rose->flushCombProgramOffset && !told_to_stop_matching(scratch)) {
if (roseRunFlushCombProgram(rose, scratch, ~0ULL) == MO_HALT_MATCHING) {
scratch->core_info.status |= STATUS_TERMINATED;
}
}
setStreamStatus(state, scratch->core_info.status);
if (likely(!can_stop_matching(scratch))) {
@ -994,6 +988,13 @@ hs_error_t HS_CDECL hs_close_stream(hs_stream_t *id, hs_scratch_t *scratch,
unmarkScratchInUse(scratch);
}
if (id->rose->flushCombProgramOffset && !told_to_stop_matching(scratch)) {
if (roseRunFlushCombProgram(id->rose, scratch, ~0ULL)
== MO_HALT_MATCHING) {
scratch->core_info.status |= STATUS_TERMINATED;
}
}
hs_stream_free(id);
return HS_SUCCESS;
@ -1019,6 +1020,13 @@ hs_error_t HS_CDECL hs_reset_stream(hs_stream_t *id, UNUSED unsigned int flags,
unmarkScratchInUse(scratch);
}
if (id->rose->flushCombProgramOffset && !told_to_stop_matching(scratch)) {
if (roseRunFlushCombProgram(id->rose, scratch, ~0ULL)
== MO_HALT_MATCHING) {
scratch->core_info.status |= STATUS_TERMINATED;
}
}
// history already initialised
init_stream(id, id->rose, 0);