This is an automated email from the ASF dual-hosted git repository.
cmcfarlen pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 0bcde4c685 Fix ProxyProtocol double destructor call in
HttpTransact::State (#12724)
0bcde4c685 is described below
commit 0bcde4c685bf39e5dde192e44ec3d70d15fd5f52
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.
(cherry picked from commit cf9aeadd967b8688b0fd213984b6b1324b174e8d)
---
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 94f257b527..336b91de69 100644
--- a/include/proxy/http/HttpTransact.h
+++ b/include/proxy/http/HttpTransact.h
@@ -926,8 +926,6 @@ public:
ranges = nullptr;
range_setup = RANGE_NONE;
- // This avoids a potential leak since sometimes this class is not
destructed (ClassAllocated via HttpSM)
- pp_info.~ProxyProtocol();
return;
}