]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
knownConditionTrueFalse
authorgtsoul-tech <gtsoulkanakis@gmail.com>
Wed, 1 May 2024 09:59:34 +0000 (12:59 +0300)
committergtsoul-tech <gtsoulkanakis@gmail.com>
Wed, 1 May 2024 10:04:51 +0000 (13:04 +0300)
src/hs_valid_platform.c
src/nfa/limex_compile.cpp
src/rose/rose_build_merge.cpp

index 74a8fc1ec1c95eccaf593c43c6bdaa52d0e333ef..3fa1b08d8c7ffe2f5489734dc2511b75d864a409 100644 (file)
@@ -48,6 +48,7 @@ hs_error_t HS_CDECL hs_valid_platform(void) {
         return HS_ARCH_ERROR;
     }
 #elif !defined(VS_SIMDE_BACKEND) && (defined(ARCH_ARM32) || defined(ARCH_AARCH64))
+   //check_neon returns true for now
    if (check_neon()) {
         return HS_SUCCESS;
     } else {
index 2ec65552def40c9ada02af33edd0392ba4cb8ed3..5bc2730114f9944739d044c16efa6aff9cfaae31 100644 (file)
@@ -1481,6 +1481,7 @@ u32 buildExceptionMap(const build_info &args, ReportListCache &reports_cache,
                     continue;
                 }
                 u32 j = args.state_ids.at(w);
+                // j can be NO_STATE if args.state_ids.at(w) returns NO_STATE
                 if (j == NO_STATE) {
                     continue;
                 }
index 1e6c922246377f3620bf85e08a909f93779c4901..c0df576556cfe59b204bb182b6943c39dcdedb6a 100644 (file)
@@ -1718,9 +1718,8 @@ bool setDistinctTops(NGHolder &h1, const NGHolder &h2,
 bool setDistinctRoseTops(RoseGraph &g, NGHolder &h1, const NGHolder &h2,
                          const deque<RoseVertex> &verts1) {
     map<u32, u32> top_mapping;
-    if (!setDistinctTops(h1, h2, top_mapping)) {
-        return false;
-    }
+
+    setDistinctTops(h1, h2, top_mapping);
 
     if (top_mapping.empty()) {
         return true; // No remapping necessary.
@@ -1748,9 +1747,7 @@ static
 bool setDistinctSuffixTops(RoseGraph &g, NGHolder &h1, const NGHolder &h2,
                            const deque<RoseVertex> &verts1) {
     map<u32, u32> top_mapping;
-    if (!setDistinctTops(h1, h2, top_mapping)) {
-        return false;
-    }
+    setDistinctTops(h1, h2, top_mapping);
 
     if (top_mapping.empty()) {
         return true; // No remapping necessary.
@@ -1837,10 +1834,7 @@ void mergeNfaLeftfixes(RoseBuildImpl &tbi, LeftfixBouquet &roses) {
                 }
             }
 
-            if (!setDistinctRoseTops(g, victim, *r1.graph(), verts2)) {
-                DEBUG_PRINTF("can't set distinct tops\n");
-                continue; // next h2
-            }
+            setDistinctRoseTops(g, victim, *r1.graph(), verts2);
 
             assert(victim.kind == r1.graph()->kind);
             assert(!generates_callbacks(*r1.graph()));
@@ -2120,10 +2114,7 @@ void mergeSuffixes(RoseBuildImpl &tbi, SuffixBouquet &suffixes,
                 old_tops[v] = g[v].suffix.top;
             }
 
-            if (!setDistinctSuffixTops(g, victim, *s1.graph(), verts2)) {
-                DEBUG_PRINTF("can't set distinct tops\n");
-                continue; // next h2
-            }
+            setDistinctSuffixTops(g, victim, *s1.graph(), verts2);
 
             if (!mergeNfaPair(victim, *s1.graph(), &tbi.rm, tbi.cc)) {
                 DEBUG_PRINTF("merge failed\n");