[master] 16d7395 Snapshot the thread workspace around VCL executions.
Poul-Henning Kamp
phk at varnish-cache.org
Thu Oct 18 13:49:37 CEST 2012
commit 16d7395da8fde7bebcf6f418031f8a9db06d0b54
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Oct 18 11:48:38 2012 +0000
Snapshot the thread workspace around VCL executions.
Ideally we could just reset it, but other in-fsm-state uses of this
workspace is allowed, so we cannot know for sure that the workspace
is empty when we begin.
diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 07c1687..b54717c 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -337,10 +337,12 @@ ccf_config_use(struct cli *cli, const char * const *av, void *priv)
void \
VCL_##func##_method(struct req *req) \
{ \
+ char *aws; \
\
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); \
CHECK_OBJ_NOTNULL(req->sp, SESS_MAGIC); \
AN(req->sp); \
+ aws = WS_Snapshot(req->wrk->aws); \
req->handling = 0; \
req->cur_method = VCL_MET_ ## upper; \
VSLb(req->vsl, SLT_VCL_call, "%s", #func); \
@@ -350,6 +352,7 @@ VCL_##func##_method(struct req *req) \
req->cur_method = 0; \
assert((1U << req->handling) & bitmap); \
assert(!((1U << req->handling) & ~bitmap)); \
+ WS_Reset(req->wrk->aws, aws); \
}
#include "tbl/vcl_returns.h"
More information about the varnish-commit
mailing list