]> git.kaiwu.me - haproxy.git/commitdiff
Revert "OPTIM: acl: only reset ctx and flags, not the whole sample"
authorWilly Tarreau <w@1wt.eu>
Tue, 1 Dec 2026 10:40:50 +0000 (11:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 1 Dec 2026 10:42:03 +0000 (11:42 +0100)
This reverts commit 903405ce3c3c09352503423cb67117a7e95a518d.

According to Claude (?) this is the one that breaks the CI because some
bogus sample fetches rely on pre-existing data before the call. This
possibly indicates a new class of bugs to take care of, so that's not
in scope for this version.

src/acl.c

index 2e069d6316f26206b0d896a67b643fedcf213b81..806aab4cfc1c168e67ce0399f38ab907d1ac7a70 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -1083,8 +1083,7 @@ enum acl_test_res acl_exec_cond(struct acl_cond *cond, struct proxy *px, struct
                        acl_res = ACL_TEST_FAIL;
                        list_for_each_entry(expr, &acl->expr, list) {
                                /* we need to reset context and flags */
-                               memset(&smp.ctx, 0, sizeof(smp.ctx));
-                               smp.flags = smp.opt = 0;
+                               memset(&smp, 0, sizeof(smp));
                        fetch_next:
                                if (!sample_process(px, sess, strm, opt, expr->smp, &smp)) {
                                        /* maybe we could not fetch because of missing data */