Re: squid-3.HEAD IPAddress leak

From: Amos Jeffries <squid3@dont-contact.us>
Date: Fri, 8 Feb 2008 10:39:16 +1300 (NZDT)

>
> On Thu, 2008-02-07 at 14:08 +0900, Adrian Chadd wrote:
>> On Thu, Feb 07, 2008, Robert Collins wrote:
>>
>> > > Still, this is one of those "death of a thousand cuts" method of
>> > > killing performance..
>> >
>> > Right, I haven't seen the commit; care to mail the diff?
>>
>> Which? I just looked at the places where Amos is calling GetAddrInfo()
>> and FreeAddrInfo(); more then one are:
>>
>> * GetAddrInfo(temp, );
>> * F->{something} = temp;
>> * FreeAddrInfo(temp);
>
> Wheee, surely that would be better as
> F->{something} = GetAddrInfo(...)
>

F-something should all be IPAddress type. Assignment to update based on
some results kernel places in temp. That usage above is a guaranteed leak
of N bytes where N can be up to the size of a small DNS zone!

Please read this for a short synopsis of the requirements of addrinfo usage:
  http://linux.die.net/man/3/getaddrinfo

Amos
Received on Thu Feb 07 2008 - 14:39:20 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST