[master] 6a70f4a fix lost workspace overflow markers

Nils Goroll nils.goroll at uplex.de
Fri Apr 20 12:15:14 UTC 2018


commit 6a70f4aeb5bf6047affa77307522b0cf6f2dd7ba
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Apr 20 14:10:32 2018 +0200

    fix lost workspace overflow markers
    
    As WS_Reset() clears the overflow marker, the correct order for
    resetting and marking an overflow is WS_Reset(); WS_MarkOverflow();
    
    Fixes the last seemingly obscure bit of #2645

diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index 52adc63..90d9e0d 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -411,8 +411,8 @@ VRT_l_beresp_storage_hint(VRT_CTX, const char *str, ...)
 
 	if (p == NULL) {
 		VSLb(ctx->vsl, SLT_LostHeader, "storage_hint");
-		WS_MarkOverflow(ctx->ws);
 		WS_Reset(ctx->ws, sn);
+		WS_MarkOverflow(ctx->ws);
 		return;
 	}
 
diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c
index fdf1227..8651993 100644
--- a/lib/libvmod_std/vmod_std.c
+++ b/lib/libvmod_std/vmod_std.c
@@ -154,8 +154,8 @@ vmod_log(VRT_CTX, const char *fmt, ...)
 	va_end(ap);
 
 	if (p == NULL) {
-		WS_MarkOverflow(ctx->ws);
 		WS_Reset(ctx->ws, sn);
+		WS_MarkOverflow(ctx->ws);
 		return;
 	}
 


More information about the varnish-commit mailing list