]> err.no Git - varnish/commitdiff
If HSH_Lookup() returns non-NULL, assert that sp->objhead != NULL.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 19 Feb 2008 11:57:04 +0000 (11:57 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 19 Feb 2008 11:57:04 +0000 (11:57 +0000)
HSH_Lookup() is supposed to guarantee this, but it appears that it
sometimes doesn't (perhaps a bug snuck in with grace mode?)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2516 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_center.c

index 317b6efe070ef3d30633e60828bd6c888a268608..988f5cd5c0beaf79d123715f5621420a285c856a 100644 (file)
@@ -547,6 +547,7 @@ cnt_lookup(struct sess *sp)
                 * We hit a busy object, disembark worker thread and expect
                 * hash code to restart us, still in STP_LOOKUP, later.
                 */
+               spassert(sp->objhead != NULL);
                WSP(sp, SLT_Debug, "on waiting list <%s>", sp->objhead->hash);
                /*
                 * There is a non-zero risk that we come here more than once