mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
knownConditionTrueFalse fixes previously fp
This commit is contained in:
parent
389b55c647
commit
a634d57b2d
@ -785,7 +785,7 @@ enum RepeatMatch repeatHasMatchRange(const struct RepeatInfo *info,
|
|||||||
if (diff > info->repeatMax) {
|
if (diff > info->repeatMax) {
|
||||||
DEBUG_PRINTF("range list is stale\n");
|
DEBUG_PRINTF("range list is stale\n");
|
||||||
return REPEAT_STALE;
|
return REPEAT_STALE;
|
||||||
} else if (diff >= info->repeatMin && diff <= info->repeatMax) {
|
} else if (diff >= info->repeatMin) {
|
||||||
return REPEAT_MATCH;
|
return REPEAT_MATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -836,7 +836,7 @@ enum RepeatMatch repeatHasMatchBitmap(const struct RepeatInfo *info,
|
|||||||
if (diff > info->repeatMax) {
|
if (diff > info->repeatMax) {
|
||||||
DEBUG_PRINTF("stale\n");
|
DEBUG_PRINTF("stale\n");
|
||||||
return REPEAT_STALE;
|
return REPEAT_STALE;
|
||||||
} else if (diff >= info->repeatMin && diff <= info->repeatMax) {
|
} else if (diff >= info->repeatMin) {
|
||||||
return REPEAT_MATCH;
|
return REPEAT_MATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1495,7 +1495,7 @@ void findExclusiveInfixes(RoseBuildImpl &build, build_context &bc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
bool buildLeftfixes(RoseBuildImpl &tbi, build_context &bc,
|
void buildLeftfixes(RoseBuildImpl &tbi, build_context &bc,
|
||||||
QueueIndexFactory &qif, set<u32> *no_retrigger_queues,
|
QueueIndexFactory &qif, set<u32> *no_retrigger_queues,
|
||||||
set<u32> *eager_queues, bool do_prefix) {
|
set<u32> *eager_queues, bool do_prefix) {
|
||||||
RoseGraph &g = tbi.g;
|
RoseGraph &g = tbi.g;
|
||||||
@ -1581,7 +1581,7 @@ bool buildLeftfixes(RoseBuildImpl &tbi, build_context &bc,
|
|||||||
leftfix);
|
leftfix);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
@ -2059,16 +2059,8 @@ bool buildNfas(RoseBuildImpl &tbi, build_context &bc, QueueIndexFactory &qif,
|
|||||||
suffixTriggers.clear();
|
suffixTriggers.clear();
|
||||||
|
|
||||||
*leftfixBeginQueue = qif.allocated_count();
|
*leftfixBeginQueue = qif.allocated_count();
|
||||||
|
buildLeftfixes(tbi, bc, qif, no_retrigger_queues, eager_queues,true);
|
||||||
if (!buildLeftfixes(tbi, bc, qif, no_retrigger_queues, eager_queues,
|
buildLeftfixes(tbi, bc, qif, no_retrigger_queues, eager_queues,false);
|
||||||
true)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!buildLeftfixes(tbi, bc, qif, no_retrigger_queues, eager_queues,
|
|
||||||
false)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ TEST_P(FDRFloodp, NoMask) {
|
|||||||
|
|
||||||
struct hs_scratch scratch;
|
struct hs_scratch scratch;
|
||||||
scratch.fdr_conf = NULL;
|
scratch.fdr_conf = NULL;
|
||||||
while (1) {
|
while (c != 255) {
|
||||||
SCOPED_TRACE((unsigned int)c);
|
SCOPED_TRACE((unsigned int)c);
|
||||||
u8 bit = 1 << (c & 0x7);
|
u8 bit = 1 << (c & 0x7);
|
||||||
u8 cAlt = c ^ bit;
|
u8 cAlt = c ^ bit;
|
||||||
@ -233,9 +233,7 @@ TEST_P(FDRFloodp, NoMask) {
|
|||||||
}
|
}
|
||||||
matchesCounts.clear();
|
matchesCounts.clear();
|
||||||
|
|
||||||
if (++c == 0) {
|
++c;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +246,7 @@ TEST_P(FDRFloodp, WithMask) {
|
|||||||
|
|
||||||
struct hs_scratch scratch;
|
struct hs_scratch scratch;
|
||||||
scratch.fdr_conf = NULL;
|
scratch.fdr_conf = NULL;
|
||||||
while (1) {
|
while (c != 255) {
|
||||||
u8 bit = 1 << (c & 0x7);
|
u8 bit = 1 << (c & 0x7);
|
||||||
u8 cAlt = c ^ bit;
|
u8 cAlt = c ^ bit;
|
||||||
SCOPED_TRACE((unsigned int)c);
|
SCOPED_TRACE((unsigned int)c);
|
||||||
@ -396,9 +394,7 @@ TEST_P(FDRFloodp, WithMask) {
|
|||||||
}
|
}
|
||||||
matchesCounts.clear();
|
matchesCounts.clear();
|
||||||
|
|
||||||
if (++c == '\0') {
|
++c;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,7 +410,7 @@ TEST_P(FDRFloodp, StreamingMask) {
|
|||||||
|
|
||||||
struct hs_scratch scratch;
|
struct hs_scratch scratch;
|
||||||
scratch.fdr_conf = NULL;
|
scratch.fdr_conf = NULL;
|
||||||
while (1) {
|
while (c != 255) {
|
||||||
u8 bit = 1 << (c & 0x7);
|
u8 bit = 1 << (c & 0x7);
|
||||||
u8 cAlt = c ^ bit;
|
u8 cAlt = c ^ bit;
|
||||||
SCOPED_TRACE((unsigned int)c);
|
SCOPED_TRACE((unsigned int)c);
|
||||||
@ -548,9 +544,7 @@ TEST_P(FDRFloodp, StreamingMask) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++c == '\0') {
|
++c;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
matchesCounts.clear();
|
matchesCounts.clear();
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,7 @@ std::ostream &operator<<(std::ostream &os, const flat_set<T> &f) {
|
|||||||
os << "{";
|
os << "{";
|
||||||
for (auto it = begin(f); it != end(f); ++it) {
|
for (auto it = begin(f); it != end(f); ++it) {
|
||||||
os << *it;
|
os << *it;
|
||||||
if (it != end(f)) {
|
os << ", ";
|
||||||
os << ", ";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
os << "}";
|
os << "}";
|
||||||
return os;
|
return os;
|
||||||
|
@ -149,9 +149,7 @@ std::ostream &operator<<(std::ostream &os, const insertion_ordered_set<K> &s) {
|
|||||||
os << "{";
|
os << "{";
|
||||||
for (auto it = begin(s); it != end(s); ++it) {
|
for (auto it = begin(s); it != end(s); ++it) {
|
||||||
os << *it;
|
os << *it;
|
||||||
if (it != end(s)) {
|
os << ", ";
|
||||||
os << ", ";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
os << "}";
|
os << "}";
|
||||||
return os;
|
return os;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user