]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 5008: SIGBUS in PagePool::level() with custom rock slot size (#515)
authorjijiwawa <33614409+jijiwawa@users.noreply.github.com>
Sat, 23 Nov 2019 10:24:41 +0000 (10:24 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Fri, 3 Jan 2020 22:38:44 +0000 (11:38 +1300)
commitb47054d2f6859c31a5737872aa5a89200dc96728
tree4025fda36f7381f769545e347391c79035769d06
parent550467ad4b55442549ee5bd1cf2b673c9cb9809c
Bug 5008: SIGBUS in PagePool::level() with custom rock slot size (#515)

SMP Squids were crashing on arm64 due to incorrect memory alignment of
Ipc::Mem::PagePool::theLevels array. The relative position of the array
depends on the number of workers and the number of pages (influenced by
the cache capacity and slot size), so some configurations worked OK.

We have to manually align manually positioned fields inside shared
memory segments. Thankfully, C++11 provides alignment-computing APIs.
src/ipc/mem/PagePool.cc
src/ipc/mem/PagePool.h
src/ipc/mem/PageStack.cc
src/ipc/mem/PageStack.h