]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: vars: make parse_store() return error on var_set() failure
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Apr 2026 01:24:07 +0000 (03:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 30 Apr 2026 06:37:10 +0000 (08:37 +0200)
commit2b30330cdcce4b3fd3648b480b0063ab167df054
treeecdcef7cdf99e53d590207e268026248b89a5b26
parent64e5489864c6bdc227ca97b53faed0ace496891d
BUG/MINOR: vars: make parse_store() return error on var_set() failure

In 2.5, variables in the scope "proc" were pre-created with commit
df8eeb1619 ("MEDIUM: vars: pre-create parsed SCOPE_PROC variables as
permanent ones"). However one test on var_set() was copy-pasted from
vars_check_args() into parse_store(), and the former returns 0 on
error while for the latter it's a success. This means that some errors
on variables of scope "proc" (typically alloc failure) can be missed
at boot time, probably either making that variable invisible or causing
a crash during boot.

Let's return ACT_RET_PRS_ERR instead. This can be backported.
src/vars.c