From 2e7fdfc9a10590fe4cd1b20b8046d8250664f14a Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 25 Nov 2019 19:43:31 +0100 Subject: [PATCH] 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. --- src/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.47.3