Assert no duplicate trimming

Ref #33
Ref https://github.com/varnishcache/varnish-cache/pull/4013
parent 5fc0b708
......@@ -4043,6 +4043,10 @@ fellow_busy_obj_getspace(struct fellow_busy *fbo, size_t *sz, uint8_t **ptr)
assert(*sz > 0);
AN(ptr);
// #33 https://github.com/varnishcache/varnish-cache/pull/4013
if (fbo->body_seglist == NULL)
WRONG("_getspace() called after _trimstore()");
CHECK_OBJ_NOTNULL(fbo->fc, FELLOW_CACHE_MAGIC);
CHECK_OBJ_NOTNULL(fbo->fc->tune, STVFE_TUNE_MAGIC);
max = (size_t)1 << fbo->fc->tune->chunk_exponent;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment