BUG/MEDIUM: sample: make the CPU and latency sample fetches check for a stream
authorWilly Tarreau <w@1wt.eu>
Wed, 29 Apr 2020 09:59:02 +0000 (11:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2020 10:23:28 +0000 (12:23 +0200)
commit4080b9e6cd272301077d85b5bfb79d5e76cc3864
treeedf70688e36c24d8f9b0bef70599c50abff3e13c
parentc000f0d1e1228dd64a00538a387e7de3290b0860
BUG/MEDIUM: sample: make the CPU and latency sample fetches check for a stream

cpu_calls, cpu_ns_avg, cpu_ns_tot, lat_ns_avg and lat_ns_tot depend on the
stream to find the current task and must check for it or they may cause a
crash if misused or used in a log-format string after commit 5f940703b3
("MINOR: log: Don't depends on a stream to process samples in log-format
string").

This must be backported as far as 1.9.

(cherry picked from commit e0dd210cea36972a6f566b9b49d8f0c33340df99)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/sample.c