From: Willy Tarreau Date: Fri, 11 Mar 2022 15:55:49 +0000 (+0100) Subject: BUG/MINOR: buffer: fix debugging condition in b_peek_varint() X-Git-Tag: v2.6-dev3~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1cb4ac745994cf62bb259d117c4b7cdaf8c8dd7;p=thirdparty%2Fhaproxy.git BUG/MINOR: buffer: fix debugging condition in b_peek_varint() The BUG_ON_HOT() test condition added to b_peek_varint() by commit 8873b85bd ("DEBUG: buf: add BUG_ON_HOT() to most buffer management functions") was wrong as in this function is not b->data, so that was triggering during live dumps of H2 traces on the CLI when built with -DDEBUG_STRICT=2. No backport is needed. --- diff --git a/include/haproxy/buf.h b/include/haproxy/buf.h index 3f45ee849c..4ea4b73f13 100644 --- a/include/haproxy/buf.h +++ b/include/haproxy/buf.h @@ -913,7 +913,7 @@ static inline int b_peek_varint(struct buffer *b, size_t ofs, uint64_t *vptr) uint64_t v = 0; int bits = 0; - BUG_ON_HOT(ofs > data); + BUG_ON_HOT(ofs > b_data(b)); if (data != 0 && (*head >= 0xF0)) { v = *head;