GitHub user jpeach opened a pull request:

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

    HostDB memory fixes

    [TS-5065](https://issues.apache.org/jira/browse/TS-5066) Use after free 
clearing HostDB.
    [TS-5066](https://issues.apache.org/jira/browse/TS-5065) HostDB 
serialization leaks on error path.

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

    $ git pull https://github.com/jpeach/trafficserver fix/hostdb

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

    https://github.com/apache/trafficserver/pull/1235.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 #1235
    
----
commit f49eed1fac6f0e0161039d0b27d05957de828730
Author: James Peach <jpe...@apache.org>
Date:   2016-11-26T07:09:47Z

    TS-5065: Fix RefCountCache iterator invalidation.
    
    Removing items from the TSHashMap invalidates the iterator because the
    linked list pointers are embedded in the hash node, so we can't do that
    while clearing. Instead, deallocate and remove each entry explicitly.

commit 223f28b58b495ee326ca5ceada7947170a7f270f
Author: James Peach <jpe...@apache.org>
Date:   2016-11-26T19:47:04Z

    TS-5066: Fix HostDB memory leaks on serialization failure.
    
    If the serializer fails to write the partition, the copied entries were
    being leaked. Clean up the cache entry allocation to centralize the
    pain of it and allow both the cache and the serializer to share the same
    allocation and free helpers.

commit 966338d52896114c0d0136b6deb8f86e6d24e89d
Author: James Peach <jpe...@apache.org>
Date:   2016-11-26T20:41:37Z

    Improve HostDB serialization warnings.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to