diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c index 3cbd627348f..70996a2f1e4 100644 --- a/bin/varnishd/cache/cache_req_body.c +++ b/bin/varnishd/cache/cache_req_body.c @@ -59,7 +59,6 @@ vrb_pull(struct req *req, ssize_t maxsize, objiterate_f *func, void *priv) enum vfp_status vfps = VFP_ERROR; const struct stevedore *stv; ssize_t req_bodybytes = 0; - unsigned hint; CHECK_OBJ_NOTNULL(req, REQ_MAGIC); @@ -77,8 +76,7 @@ vrb_pull(struct req *req, ssize_t maxsize, objiterate_f *func, void *priv) req->storage = NULL; - hint = maxsize > 0 ? maxsize : 1; - if (STV_NewObject(req->wrk, req->body_oc, stv, hint) == 0) { + if (STV_NewObject(req->wrk, req->body_oc, stv, 0) == 0) { req->req_body_status = BS_ERROR; HSH_DerefBoc(req->wrk, req->body_oc); AZ(HSH_DerefObjCore(req->wrk, &req->body_oc, 0)); diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c index bb7a43d4e8c..c7469f5eb4a 100644 --- a/bin/varnishd/cache/cache_req_fsm.c +++ b/bin/varnishd/cache/cache_req_fsm.c @@ -383,7 +383,7 @@ cnt_synth(struct worker *wrk, struct req *req) req->objcore = HSH_Private(wrk); CHECK_OBJ_NOTNULL(req->objcore, OBJCORE_MAGIC); szl = -1; - if (STV_NewObject(wrk, req->objcore, stv_transient, 1024)) { + if (STV_NewObject(wrk, req->objcore, stv_transient, 0)) { body = VSB_data(synth_body); szl = VSB_len(synth_body); assert(szl >= 0); diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h index 404ebc894ee..062041f493b 100644 --- a/bin/varnishd/cache/cache_varnishd.h +++ b/bin/varnishd/cache/cache_varnishd.h @@ -564,6 +564,7 @@ const struct stevedore *STV_next(void); int STV_BanInfoDrop(const uint8_t *ban, unsigned len); int STV_BanInfoNew(const uint8_t *ban, unsigned len); void STV_BanExport(const uint8_t *banlist, unsigned len); +// STV_NewObject() len is space for OBJ_VARATTR int STV_NewObject(struct worker *, struct objcore *, const struct stevedore *, unsigned len); diff --git a/bin/varnishd/storage/stevedore.c b/bin/varnishd/storage/stevedore.c index 9c28479976c..7813c424f62 100644 --- a/bin/varnishd/storage/stevedore.c +++ b/bin/varnishd/storage/stevedore.c @@ -84,7 +84,6 @@ STV_NewObject(struct worker *wrk, struct objcore *oc, CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(stv, STEVEDORE_MAGIC); - assert(wsl > 0); wrk->strangelove = cache_param->nuke_limit; AN(stv->allocobj);