]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4616: ips: fix tsan issue with logging rule tree construction
authorRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 14 Feb 2025 12:59:45 +0000 (12:59 +0000)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 14 Feb 2025 12:59:45 +0000 (12:59 +0000)
Merge in SNORT/snort3 from ~RUCOMBS/snort3:fp_tsan_update to master

Squashed commit of the following:

commit 32d12f5db433e20cd99cb1bf6ddcab428344d39a
Author: Russ Combs <rucombs@cisco.com>
Date:   Tue Feb 11 13:43:06 2025 -0500

    ips: fix tsan issue with logging rule tree construction

src/detection/fp_create.cc

index b70c003b663cd1ec8b376018ceb50f27ecdf5930..09a69491f8d6d563ba976fa2208577502b90cdf5 100644 (file)
@@ -118,19 +118,18 @@ static int finalize_detection_option_tree(SnortConfig* sc, detection_option_tree
 
         if ( void* dup_node = add_detection_option_tree(sc, node) )
         {
-            // FIXIT-L delete dup_node and keep original?
             delete node;
             root->children[i] = (detection_option_tree_node_t*)dup_node;
         }
         else
         {
             fixup_tree(root->children[i], true, 0);
-        }
 
-        trace_logf(detection_trace, TRACE_OPTION_TREE, nullptr, "%3d %3d  %p %4s\n",
-            0, root->num_children, (void*)root, "root");
+            trace_logf(detection_trace, TRACE_OPTION_TREE, nullptr, "%3d %3d  %p %4s\n",
+                0, root->num_children, (void*)root, "root");
 
-        print_option_tree(root->children[i], 0);
+            print_option_tree(root->children[i], 0);
+        }
     }
 
     return 0;