]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 4057: Avoid on-exit crashes when adaptation is enabled.
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 14 Dec 2014 11:02:41 +0000 (03:02 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Dec 2014 11:02:41 +0000 (03:02 -0800)
commite1ee0ac01a75c5a9a215dc35d429e9486d7e4ade
treef954cf024fbe6defb5087fa26dd48fe801b177a3
parent5a1755ec4d32e77df4a6df656ecd36c3cf9ce474
Bug 4057: Avoid on-exit crashes when adaptation is enabled.

After trunk r13269 (Vector refactor) destroyed vector objects still have
positive item counts. This exposes use-after-delete bugs. In this particular
case, global adaptation rule/group/service arrays are destructed by global
destruction sequence first and then again by Adaptation::*::TheConfig objects
destructors.

This change avoiding static destruction order dependencies by storing those
global adaptation arrays on heap.
src/adaptation/AccessRule.cc
src/adaptation/Service.cc
src/adaptation/ServiceGroups.cc