]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: buf: add BUG_ON_HOT() to most buffer management functions
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Feb 2022 15:11:33 +0000 (16:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Feb 2022 15:14:02 +0000 (16:14 +0100)
commit8873b85bd92fb4a7744f13bf462c540ed6c4946d
tree11b3956c129e586dc356ce4b7ad01d8ff4376317
parenta8f4b34bb743f64e1c767d60756e508dd4abcc54
DEBUG: buf: add BUG_ON_HOT() to most buffer management functions

A number of tests are now performed in low-level buffer management
functions to verify that we're not appending data to a full buffer
for example, or that the buffer passed in argument is consistent in
that its data don't outweigh its size. The few functions that already
involve memcpy() or memmove() instead got a BUG_ON() that will always
be enabled, since the overhead remains minimalist.
include/haproxy/buf.h