You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "bryancall (via GitHub)" <gi...@apache.org> on 2025/12/03 05:07:55 UTC
[PR] Fix ProxyProtocol double destructor call in HttpTransact::State [trafficserver]
bryancall opened a new pull request, #12724:
URL: https://github.com/apache/trafficserver/pull/12724
This PR fixes a build failure on Fedora 42 with GCC 15 introduced by PR #12680.
## Problem
PR #12680 added an explicit destructor call `pp_info.~ProxyProtocol();` in `HttpTransact::State::destroy()` with a comment claiming it prevents a memory leak. However, since `pp_info` is a regular member variable (not allocated with placement new), it will be automatically destroyed when the `State` object is destroyed. The explicit destructor call causes undefined behavior (double destruction), which GCC 15 now correctly detects as an error:
```
error: 'std::__cxx11::basic_string<char>::_M_dataplus._M_p' is used uninitialized [-Werror=uninitialized]
```
## Solution
Remove the explicit destructor call. The `ProxyProtocol` member with its `std::string` member will be properly cleaned up automatically through RAII.
## Testing
This fix allows the Fedora 42 build to succeed.
Fixes the issue introduced in #12680
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix ProxyProtocol double destructor call in HttpTransact::State [trafficserver]
Posted by "bryancall (via GitHub)" <gi...@apache.org>.
bryancall merged PR #12724:
URL: https://github.com/apache/trafficserver/pull/12724
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix ProxyProtocol double destructor call in HttpTransact::State [trafficserver]
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #12724:
URL: https://github.com/apache/trafficserver/pull/12724#issuecomment-3607838455
Cherry-picked to 10.1.x branch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org