]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[CRITICAL] buffers: buffer_insert_line2 must not change the ->w entry
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Jan 2010 19:39:51 +0000 (20:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Jan 2010 19:46:42 +0000 (20:46 +0100)
commitc5bbe53f6f86efac2d28d4443d1c2da35948442b
tree19a5ad7ae16f323942792fca04712dbd78ccb7de
parent88d349d25dc9344c6e4354079b8fdf40ed40c5b7
[CRITICAL] buffers: buffer_insert_line2 must not change the ->w entry

Krzysztof Oledzki reported that 1.4-dev7 would regularly crash
on an apparently very common workload. The cores he provided
showed some inter-buffer data corruption, exactly similar to
what was fixed by the following recent commit :

bbfa7938bd74adbfa435f26503fc10f5938195a3 [BUG] buffer_replace2 must never change the ->w entry

In fact, it was buffer_insert_line2() which was still modifying the
->w pointer, causing issues with pipelined responses in keep-alive
mode if some headers were to be added.

The bug requires a remote client, a near server, large server buffers
and small client buffers to be reproduced, with response header
insertion. Still, it's surprizing that it did not trigger earlier.

Now after 100k pipelined requests it did not trigger anymore.
src/buffers.c