r2201 - in branches/1.2: . bin/varnishd
des at projects.linpro.no
des at projects.linpro.no
Tue Oct 30 12:04:12 CET 2007
Author: des
Date: 2007-10-30 12:04:12 +0100 (Tue, 30 Oct 2007)
New Revision: 2201
Modified:
branches/1.2/
branches/1.2/bin/varnishd/cache_hash.c
branches/1.2/bin/varnishd/hash_classic.c
Log:
Merged revisions 2187-2188 via svnmerge from
svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache
........
r2187 | phk | 2007-10-29 13:06:34 +0100 (Mon, 29 Oct 2007) | 2 lines
More checks, trying to find pointer tango
........
r2188 | phk | 2007-10-29 13:09:54 +0100 (Mon, 29 Oct 2007) | 2 lines
Typo in previous commit.
........
Property changes on: branches/1.2
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/varnish-cache:1-2101,2104-2107,2115-2120,2122-2130,2133,2151,2153-2154,2157,2161-2162,2166-2168,2175-2176,2180-2184,2186,2191-2192
+ /trunk/varnish-cache:1-2101,2104-2107,2115-2120,2122-2130,2133,2151,2153-2154,2157,2161-2162,2166-2168,2175-2176,2180-2184,2186-2188,2191-2192
Modified: branches/1.2/bin/varnishd/cache_hash.c
===================================================================
--- branches/1.2/bin/varnishd/cache_hash.c 2007-10-30 11:03:50 UTC (rev 2200)
+++ branches/1.2/bin/varnishd/cache_hash.c 2007-10-30 11:04:12 UTC (rev 2201)
@@ -73,6 +73,7 @@
struct storage *st;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
w = sp->wrk;
if (w->nobjhead == NULL) {
@@ -87,7 +88,8 @@
if (w->nobj == NULL) {
st = STV_alloc(sp, params->mem_workspace);
XXXAN(st);
- w->nobj = (void *)st->ptr;
+ assert(st->space > sizeof *w->nobj);
+ w->nobj = (void *)st->ptr; /* XXX: align ? */
st->len = sizeof *w->nobj;
memset(w->nobj, 0, sizeof *w->nobj);
w->nobj->objstore = st;
@@ -121,6 +123,9 @@
unsigned u, v;
const char *b;
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
+ CHECK_OBJ_NOTNULL(obj, OBJHEAD_MAGIC);
i = sp->lhashptr - obj->hashlen;
if (i)
return (i);
Modified: branches/1.2/bin/varnishd/hash_classic.c
===================================================================
--- branches/1.2/bin/varnishd/hash_classic.c 2007-10-30 11:03:50 UTC (rev 2200)
+++ branches/1.2/bin/varnishd/hash_classic.c 2007-10-30 11:04:12 UTC (rev 2201)
@@ -128,6 +128,9 @@
unsigned u, v;
int i;
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->http, HTTP_MAGIC);
CHECK_OBJ_ORNULL(noh, OBJHEAD_MAGIC);
digest = ~0U;
More information about the varnish-commit
mailing list