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

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new cf9aeadd96 Fix ProxyProtocol double destructor call in 
HttpTransact::State (#12724)
cf9aeadd96 is described below

commit cf9aeadd967b8688b0fd213984b6b1324b174e8d
Author: Bryan Call <[email protected]>
AuthorDate: Wed Dec 3 08:54:01 2025 -0800

    Fix ProxyProtocol double destructor call in HttpTransact::State (#12724)
    
    Removes explicit destructor call for pp_info member in 
HttpTransact::State::destroy().
    
    The explicit destructor call was causing undefined behavior as the
    ProxyProtocol member will be automatically destroyed when the State object 
is
    destroyed. This resulted in a double-free detected by GCC 15 in Fedora 42 
builds.
    
    The member variable pp_info is a regular class member, not allocated with
    placement new, so it will be properly destroyed automatically when the State
    object is destroyed or when the destructor runs.
---
 include/proxy/http/HttpTransact.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/proxy/http/HttpTransact.h 
b/include/proxy/http/HttpTransact.h
index ba0c5d6b6f..7034740c9f 100644
--- a/include/proxy/http/HttpTransact.h
+++ b/include/proxy/http/HttpTransact.h
@@ -889,8 +889,6 @@ public:
       ranges      = nullptr;
       range_setup = RangeSetup_t::NONE;
 
-      // This avoids a potential leak since sometimes this class is not 
destructed (ClassAllocated via HttpSM)
-      pp_info.~ProxyProtocol();
       return;
     }
 

Reply via email to