]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix cbdata assertion in carpInit() (#1454)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 12 Aug 2023 18:28:37 +0000 (18:28 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 13 Aug 2023 21:59:38 +0000 (21:59 +0000)
commit6240f5809146d3b6dcfcfd7b40e14c70ecb9af9a
tree006ce98c65b1bc5eec52c730b0fcdfb13f4bfef4
parentcef32d3e1dd72e69a3ed54f8b423ad06112e0747
Fix cbdata assertion in carpInit() (#1454)

... after commit e7959b5

    FATAL: assertion failed: cbdata.cc:276: "c->locks > 0"

We cannot test cbdata validity of CachePeer pointers stored in
Config.peers because Config.peers own CachePeer objects. By definition,
owners should not lock their objects and do not need to test object
validity: Owners determine the lifetime of those objects! Naturally,
unlocked objects must not be tested for validity by others because to
test an object validity one has to have a lock that preserves object
metadata even after the object is invalidated (by its owner).
src/carp.cc