Kaydet (Commit) c27e92b2 authored tarafından Noel Grandin's avatar Noel Grandin

fix crash in lru_map/SalBitmap on shutdown

When we shut down, we destroy the various caches, in the process of
which SalBitmap calls back into it's owning cache, causing a SIGSEGV.

Found while loading files from tdf#83426

Change-Id: I53db1621a0fdb75a8e66582662b0e2666499192b
Reviewed-on: https://gerrit.libreoffice.org/73387
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst d4dd0732
......@@ -69,6 +69,14 @@ public:
lru_map(size_t nMaxSize)
: mMaxSize(nMaxSize ? nMaxSize : std::min(mLruMap.max_size(), mLruList.max_size()))
// Some code .e.g. SalBitmap likes to remove itself from a cache during it's destructor, which means we
// get calls into lru_map while we are in destruction, so use the swap-and-clear idiom to avoid those problems.
list_t aLruListTemp;
void insert(key_value_pair_t& rPair)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment