Commit 7480dff7 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Assert that the thread-workspace is empty on state transitions. We want

to keep it light and small, so we forbid any long-term usage an detect
leakage with this assert.
parent ff2647b2
......@@ -1205,9 +1205,16 @@ CNT_Request(struct worker *wrk, struct req *req)
*/
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_ORNULL(wrk->nobjhead, OBJHEAD_MAGIC);
WS_Assert(wrk->aws);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
/*
* We don't want the thread workspace to be used for
* anything of long duration, so mandate that it be
* empty on state-transitions.
*/
WS_Assert(wrk->aws);
assert(wrk->aws->s == wrk->aws->f);
switch (req->req_step) {
#define REQ_STEP(l,u,arg) \
case R_STP_##u: \
......
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