]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: chunk: Allow large chunks uses from large const buffers
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 29 Sep 2026 06:54:25 +0000 (08:54 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 29 Sep 2026 12:30:21 +0000 (14:30 +0200)
commitdc8398145d25e66a58de35fda4ba9b741acb79e2
tree28b89f86b27e4610696ace40a47a1d540927e2d4
parent718fadb898ec5778df27b05d3bf6aa8ff0d620bb
BUG/MINOR: chunk: Allow large chunks uses from large const buffers

When a chunk was retrieved via get_best_trash_chunk() or
alloc_best_trash_chunk(), it was not possible to get a large chunk when the
original buffer was a constant 0-sized buffer, independently on size of data
pointed by it.

With this patch, we relaxe the test. It is now possible to get a large
chunks from a 0-sized buffer if it points on large data. Indeed, in that
case, it means that data are hosted in a large buffer, so it is safe to get
a large chunk if possible.

This patch should be backported to 3.4 after a period of observation.
include/haproxy/chunk.h
src/chunk.c