• Stephan Bergmann's avatar
    Remove ScLookupCache from ScLookupCacheMap it had been added to · e2e9e617
    Stephan Bergmann yazdı
    ...instead of removing an arbitrary ScLookupCache with a matching ScRange from
    the first ScLookupCacheMap that happens to contain one.
    
    79449d73 "make VLOOKUP in Calc thread-safe"
    introduced per-thread ScLookupCacheMaps, so that multiple ScLookupCacheMaps can
    contain ScLookupCaches with identical ScRanges.  For example, UITest_calc_tests6
    adds ScLookupCaches for ScRange 1!R2C18:R97C18 to different threads'
    ScLookupCacheMaps.  That causes confusion so that calling
    ScDocument::RemoveLookupCacheHelper to remove an ScLookupCache from a
    mismatching ScLookupCacheMap accesses a different
    
      ScLookupCache* pCache = (*it).second.release();
    
    that may already have been destroyed; see failing ASan/UBSan builds like
    <https://ci.libreoffice.org//job/lo_ubsan/1067/>.
    
    Change-Id: I70c33b236dc502b8a98e0e313d422424eec5dbca
    Reviewed-on: https://gerrit.libreoffice.org/62194
    Tested-by: Jenkins
    Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
    e2e9e617
document.hxx 132 KB