[master] 8471010e3 Report the VCL name of the uninitialized object.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Feb 5 14:10:11 UTC 2019
commit 8471010e394f2d45ff2b2afbb6b3216734265587
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Feb 5 14:09:36 2019 +0000
Report the VCL name of the uninitialized object.
diff --git a/bin/varnishtest/tests/r02839.vtc b/bin/varnishtest/tests/r02839.vtc
index 16525a833..275d934ff 100644
--- a/bin/varnishtest/tests/r02839.vtc
+++ b/bin/varnishtest/tests/r02839.vtc
@@ -7,14 +7,14 @@ server s1 {
varnish v1 -vcl+backend "" -start
-varnish v1 -errvcl "Object vo_null not initialized" {
+varnish v1 -errvcl "Object nullobj not initialized" {
import debug;
backend default { .host = "127.0.0.1"; }
sub vcl_init {
if (false) {
- new null = debug.obj();
+ new nullobj = debug.obj();
}
}
}
diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c
index 09c1d4704..13994eb6b 100644
--- a/lib/libvcc/vcc_compile.c
+++ b/lib/libvcc/vcc_compile.c
@@ -321,7 +321,7 @@ EmitInitFini(const struct vcc *tl)
VTAILQ_FOREACH(sy, &tl->sym_objects, sideways) {
Fc(tl, 0, "\tif (!%s) {\n", sy->rname);
Fc(tl, 0, "\t\tVRT_fail(ctx, "
- "\"Object %s not initialized\");\n" , sy->rname);
+ "\"Object %s not initialized\");\n" , sy->name);
Fc(tl, 0, "\t\treturn(1);\n");
Fc(tl, 0, "\t}\n");
}
More information about the varnish-commit
mailing list