Re: Vector refactor, part 3: stack

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 12 Feb 2014 11:28:18 +1300

On 2014-02-12 06:19, Kinkie wrote:
>> I've had a strange assert (at HttpHeader.cc:1551, in
>> ~HttpHeaderEntry), but I could not reproduce that nor find anything in
>> p2 or p3 of the refactor patch which may trigger it.
>> I'm running more tests at full debugging.
>
> Hit it again. Looking at HttpHeader, that code is really crappy.
> The root cause is a double-free.
> I suspect that the problem is caused by bad interactions in the
> methods manipulating the entry array; it may be that Vector used to be
> more forgiving than std::vector, especially with dealing with
> out-of-bounds access and bad iterator maths (suspect: getEntry).
>
> The attached patch worksforme(tm) for a few tens of thousands of hits
> of real browsing. If you're OK with it I can clean it up and commit.
>

Looks good.

> I suspect that HttpHeader.cc needs some love. Has anyone already
> thought about this topic or should I prepare a proposal? I'd like to
> share design ideas before going for an implementation attempt.
>
> Thanks.

Yes there is need of polish and performance fixing. Probably not worth
doing until after the parser-ng upgrades are done. The output from the
parser will affect when needs storing and manipulating by that code.

Amos
Received on Tue Feb 11 2014 - 22:28:34 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 12 2014 - 12:00:12 MST