[
https://issues.apache.org/jira/browse/TS-996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188160#comment-13188160
]
Leif Hedstrom commented on TS-996:
----------------------------------
With v3, I get a compilation failure:
{code}
HttpTransact.cc: In function \u2018HttpTransact::StateMachineAction_t
how_to_open_connection(HttpTransact::State*)\u2019:
HttpTransact.cc:5533:58: error: \u2018host_len\u2019 may be used uninitialized
in this function [-Werror=uninitialized]
HttpTransact.cc:5531:7: note: \u2018host_len\u2019 was declared here
cc1plus: all warnings being treated as errors
{code}
> HTTPHdr::m_host goes stale if HdrHeap::evacuate_from_str_heaps is called
> ------------------------------------------------------------------------
>
> Key: TS-996
> URL: https://issues.apache.org/jira/browse/TS-996
> Project: Traffic Server
> Issue Type: Bug
> Components: HTTP, MIME
> Affects Versions: 3.1.0
> Reporter: B Wyatt
> Assignee: Leif Hedstrom
> Fix For: 3.1.2
>
> Attachments: m_host.V2.patch, m_host.patch, m_host.v3.patch
>
>
> class HTTPHdr stores a copy of the string pointer from either the URLimpl or
> the MIMEHdr for the host name in m_host. In both cases, these strings can be
> moved to a new heap underneath the HTTPHdr. When this happens, the process
> will, at best read stale memory and be fine and at worst read unmapped memory
> and segfault.
> Currently, HdrHeap::evacuate_from_str_heaps is called to coalesce multiple
> heaps into a single heap. When this happens it will directly access the low
> level objects via ::move_strings calls. These objects do not posses the
> necessary information to inform parent objects about the change, nor does the
> HdrHeap directly inform interested parties.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira