From: Willy Tarreau Date: Mon, 25 Nov 2019 18:43:31 +0000 (+0100) Subject: BUG/MEDIUM: trace: fix a typo causing an incorrect startup error X-Git-Tag: v2.1.0~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e7fdfc9a10590fe4cd1b20b8046d8250664f14a;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: trace: fix a typo causing an incorrect startup error Since commit 88ebd40 ("MINOR: trace: add allocation of buffer-sized trace buffers") we have a trace buffer allocated at boot time. But there was a copy-paste error there making the test verify that the trash was allocated instead of the trace buffer. The result is that depending on the link order either the test will succeed or fail, preventing haproxy from starting at all. No backport is needed. --- diff --git a/src/trace.c b/src/trace.c index 220bf66b6c..06fec4a2b5 100644 --- a/src/trace.c +++ b/src/trace.c @@ -37,7 +37,7 @@ THREAD_LOCAL struct buffer trace_buf = { }; static int alloc_trace_buffers_per_thread() { chunk_init(&trace_buf, my_realloc2(trace_buf.area, global.tune.bufsize), global.tune.bufsize); - return !!trash.area; + return !!trace_buf.area; } static void free_trace_buffers_per_thread()