[ 
https://issues.apache.org/jira/browse/TS-3774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14635321#comment-14635321
 ] 

ASF GitHub Bot commented on TS-3774:
------------------------------------

GitHub user SolidWallOfCode opened a pull request:

    https://github.com/apache/trafficserver/pull/260

    TS-3774: Fix memory leak issue in host file parsing for HostDB.

    This implements the file double buffering and works in my tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SolidWallOfCode/trafficserver ts-3774

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/260.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #260
    
----
commit b10314d20fb7ed6c240077c6d0602801998937da
Author: Alan M. Carroll <[email protected]>
Date:   2015-07-21T16:10:05Z

    TS-3774: Fix memory leak issue in host file parsing for HostDB.

----


> Bug in HostDB hosts file implementation
> ---------------------------------------
>
>                 Key: TS-3774
>                 URL: https://issues.apache.org/jira/browse/TS-3774
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HostDB
>            Reporter: Brian Geffon
>            Assignee: Alan M. Carroll
>             Fix For: 6.1.0
>
>         Attachments: ts-3774.patch
>
>
> There is a bug in the current implementation of hostdb's use of hostsfiles. 
> Because it uses a static local variable the storage is shared and ultimately 
> will lead to race conditions if the hosts file is reloaded.
> {code}
> if (find_result != current_host_file_map->hosts_file_map.end()) {
>     // TODO: Something to make this not local :/
>     static HostDBInfo r;
>     r.round_robin = false;
>     r.round_robin_elt = false;
>     r.reverse_dns = false;
>     r.is_srv = false;
>     ats_ip_set(r.ip(), (*find_result).second);
>     return &r;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to