This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
     new 568f62c09 Revert "ORC-2123: [C++] Fix heap-use-after-free in ORC 
SearchArgument rewriteLeaves"
568f62c09 is described below

commit 568f62c09815ec3561655509f52622dfefe4912e
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Fri Mar 20 22:55:34 2026 -0700

    Revert "ORC-2123: [C++] Fix heap-use-after-free in ORC SearchArgument 
rewriteLeaves"
    
    This reverts commit a81eaa54a6a86d8d232aa17df19b415b4a29c928.
---
 c++/src/sargs/SearchArgument.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c++/src/sargs/SearchArgument.cc b/c++/src/sargs/SearchArgument.cc
index 612f0912e..ff0ba1e2d 100644
--- a/c++/src/sargs/SearchArgument.cc
+++ b/c++/src/sargs/SearchArgument.cc
@@ -315,6 +315,7 @@ namespace orc {
     // Perform BFS
     while (!nodes.empty()) {
       TreeNode& node = nodes.front();
+      nodes.pop_front();
 
       if (node->getOperator() == ExpressionTree::Operator::LEAF) {
         leaves.insert(node);
@@ -323,7 +324,6 @@ namespace orc {
           nodes.push_back(child);
         }
       }
-      nodes.pop_front();
     }
 
     // Update the leaf in place

Reply via email to