MINOR: shctx: add a few BUG_ON() for consistency checks
authorWilly Tarreau <w@1wt.eu>
Fri, 19 Nov 2021 16:47:18 +0000 (17:47 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Nov 2021 15:34:07 +0000 (16:34 +0100)
commit11924d3bcd9dc04db185504b1d3c90a8542dbfc2
treeadfeb2ceae07f02373a916ac1037eb0a6a8182b9
parentc4d5835a017a30910d8ab0b8453843b4e0263b6e
MINOR: shctx: add a few BUG_ON() for consistency checks

The shctx code relies on sensitive conditions that are hard to infer
from the code itself, let's add some BUG_ON() to verify them. They
helped spot the previous bugs.

(cherry picked from commit 48b608026b7c0d55a55b9746179542c7d524e84a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f7ea50931909ccb3df939ab7ff1b1e5c24c295ce)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/shctx.c