Bug 4981 is one known case of such invalidation, but this workaround is
much broader than that bug context. We can speculate that architectural
problems described in commit
e3b6f15 are behind (some of) these bugs.
} catch (const std::exception &e) {
debugs(call.debugSection, 3,
call.name << " threw exception: " << e.what());
+ if (!job) {
+ debugs(call.debugSection, DBG_CRITICAL, "ERROR: Squid BUG: Job invalidated during " <<
+ call.name << " that threw exception: " << e.what());
+ return; // see also: bug 4981, commit e3b6f15, and XXX in Http::Stream class description
+ }
job->callException(e);
}
+ if (!job) {
+ debugs(call.debugSection, DBG_CRITICAL, "ERROR: Squid BUG: Job invalidated during " << call.name);
+ return;
+ }
job->callEnd(); // may delete job
}