trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dragon512 <>
Subject [GitHub] trafficserver pull request #780: TS-4629: Fix use of invalid iterator in Ser...
Date Fri, 01 Jul 2016 17:18:50 GMT
Github user dragon512 commented on a diff in the pull request:
    --- Diff: proxy/http/ ---
    @@ -55,9 +55,10 @@ ServerSessionPool::ServerSessionPool() : Continuation(new_ProxyMutex()),
    -  for (IPHashTable::iterator last = m_ip_pool.end(), spot = m_ip_pool.begin(); spot !=
last; ++spot) {
    -    spot->do_io_close();
    -  }
    +  // @c do_io_close can free the instance which clears the intrusive links and breaks
the iterator.
    +  // Therefore @c do_io_close is called on a post-incremented iterator.
    +  for (IPHashTable::iterator last = m_ip_pool.end(), spot = m_ip_pool.begin(); spot !=
last ; spot++->do_io_close())
    +    ; // empty
    --- End diff --
    just a thought. As at this point the collection should be empty? do want to add an assert
that it is vs calling clear() as calling clear() on an empty collection be a no-opt or a sign
of a bug?

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 or file a JIRA ticket
with INFRA.

View raw message