]> git.ipfire.org Git - thirdparty/squid.git/commit
Do not die silently when dying via std::terminate().
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 4 Jun 2017 15:32:01 +0000 (09:32 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sun, 4 Jun 2017 15:32:01 +0000 (09:32 -0600)
commitebdb0ef1bd1f2b105bce3db116e6345eceed7e06
treefc4d82dd20ebda5c8bc8a4bc5b94dbc35361c3c6
parent4a71b1fc8b75049b0c13965c1e358806cc568d58
Do not die silently when dying via std::terminate().

Report exception failures that call std::terminate(). Exceptions unwind
stack towards main() and sooner or later get handled/reported by Squid.
However, exception _failures_ just call std::terminate(), which aborts
Squid without the stack unwinding. By default, a std::terminate() call
usually results in a silent Squid process death because some default
std::terminate_handler implementations do not say anything at all while
others write to stderr which Squid redirects to /dev/null by default.

Many different problems trigger std::terminate() calls. Most of them are
rare, but, after the C++11 migration, one category became likely in
Squid: A throwing destructor. Destructors in C++11 are implicitly
"noexcept" by default, and many old Squid destructors might throw.

These reporting changes do not bypass or eliminate any failures.
src/main.cc