From: Russ Combs (rucombs) Date: Fri, 14 Feb 2025 12:59:45 +0000 (+0000) Subject: Pull request #4616: ips: fix tsan issue with logging rule tree construction X-Git-Tag: 3.7.1.0~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f11ef3c04e81630f922306f8681247244a16f002;p=thirdparty%2Fsnort3.git Pull request #4616: ips: fix tsan issue with logging rule tree construction Merge in SNORT/snort3 from ~RUCOMBS/snort3:fp_tsan_update to master Squashed commit of the following: commit 32d12f5db433e20cd99cb1bf6ddcab428344d39a Author: Russ Combs Date: Tue Feb 11 13:43:06 2025 -0500 ips: fix tsan issue with logging rule tree construction --- diff --git a/src/detection/fp_create.cc b/src/detection/fp_create.cc index b70c003b6..09a69491f 100644 --- a/src/detection/fp_create.cc +++ b/src/detection/fp_create.cc @@ -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;