summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2010-01-25 20:39:51 +0100
committerWilly Tarreau <w@1wt.eu>2010-01-28 23:16:58 +0100
commit1bade0eae14c7719652d26bc684133e2de2b7e48 (patch)
treebebeb6126f0d588b30927d210073d932e3662a5e /src
parentc65cbb70953fef330a780ff604c55468514dbf37 (diff)
downloadhaproxy-1bade0eae14c7719652d26bc684133e2de2b7e48.tar.gz
[MINOR] 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. Note: 1.3 is not affected by this issue since it does not support keep-alive, but better fix this silly bug anyway. (cherry picked from commit c5bbe53f6f86efac2d28d4443d1c2da35948442b)
Diffstat (limited to 'src')
-rw-r--r--src/buffers.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/buffers.c b/src/buffers.c
index db84327fb..b156b31f8 100644
--- a/src/buffers.c
+++ b/src/buffers.c
@@ -205,7 +205,6 @@ int buffer_insert_line2(struct buffer *b, char *pos, const char *str, int len)
/* we only move data after the displaced zone */
if (b->r > pos) b->r += delta;
- if (b->w > pos) b->w += delta;
if (b->lr > pos) b->lr += delta;
b->l += delta;