[master] 3731e9f97 vcc: Remove stale assertion

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Jul 20 07:44:05 UTC 2023


commit 3731e9f97534b632f8b4a3032859df6116e7826c
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Jul 20 09:31:26 2023 +0200

    vcc: Remove stale assertion
    
    Fixes #3960

diff --git a/bin/varnishtest/tests/r03960.vtc b/bin/varnishtest/tests/r03960.vtc
new file mode 100644
index 000000000..2b76da9e7
--- /dev/null
+++ b/bin/varnishtest/tests/r03960.vtc
@@ -0,0 +1,9 @@
+varnishtest "invalid header name on RHS"
+
+varnish v1 -errvcl "Expected ID got '0'" {
+	vcl 4.1;
+	backend default none;
+	sub vcl_recv {
+		if (req.http.0) {}
+	}
+}
diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c
index 1d4eb6453..63578df9d 100644
--- a/lib/libvcc/vcc_expr.c
+++ b/lib/libvcc/vcc_expr.c
@@ -370,7 +370,6 @@ vcc_Eval_Var(struct vcc *tl, struct expr **e, struct token *t,
 {
 
 	(void)type;
-	assert(sym->kind == SYM_VAR);
 	vcc_AddUses(tl, t, NULL, sym, XREF_READ);
 	ERRCHK(tl);
 	*e = vcc_mk_expr(sym->type, "%s", sym->rname);


More information about the varnish-commit mailing list