Re: Vector refactor, part 3: stack

From: Kinkie <gkinkie_at_gmail.com>
Date: Tue, 11 Feb 2014 18:19:25 +0100

> 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.

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.

-- 
    Kinkie

Received on Tue Feb 11 2014 - 17:19:36 MST

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