]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: hpack: make sure the hpack table can still be built standalone
authorWilly Tarreau <w@1wt.eu>
Fri, 22 May 2020 10:05:27 +0000 (12:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 May 2020 10:13:43 +0000 (12:13 +0200)
commit0ff9b3d64fdf0707da8c9a0ae00a7cf753200e36
tree16bf9b3057803f2f2ca224795c4f4ab94ff6a1b1
parent66163ec616bd3dfb06605bfc5a6e640ea7ada7d7
BUILD: hpack: make sure the hpack table can still be built standalone

Recent commit 2bdcc70fa7 ("MEDIUM: hpack: use a pool for the hpack table")
made the hpack code finally use a pool with very unintrusive code that was
assumed to be trivial enough to adjust if the code needed to be reused
outside of haproxy. Unfortunately the code in contrib/hpack already uses
it and broke the oss-fuzz tests as it doesn't build anymore.

This patch adds an HPACK_STANDALONE macro to decide if we should use the
pools or malloc+free. The resulting macros are called hpack_alloc() and
hpack_free() respectively, and the size must be passed into the pool
itself.
include/common/hpack-tbl.h