summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documen2.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-11-27 11:25:40 +0100
committerLuboš Luňák <l.lunak@collabora.com>2020-11-30 13:17:18 +0100
commitcb25771fedd12725a72a1eb4f532698d8221c0f2 (patch)
tree33837ecb5377a3320d67cdedb61e843cafb296e0 /sc/source/core/data/documen2.cxx
parent583b0612696f42571ac97b66c159570ea452fe17 (diff)
it does not work to clear data of other thread's thread_local
The thread-specific RecursionHelper object is reused between runs, so it should not be freed after a threaded calculation finishes. But since threads may be left around longer by the thread pool, the object may be destroyed at an unknown later time. Which could possibly cause problems if it refers to data that's been destroyed meanwhile (I think all the pointers in RecursionHelper are not owning, so this should not be a problem in practice, but still). So at least clear the contents, they shouldn't be reused anyway. Change-Id: I8934441c754d20bd20d7e19a8510d9323c0db894 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106758 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source/core/data/documen2.cxx')
-rw-r--r--sc/source/core/data/documen2.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 60f62ae6587b..2e607a669896 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -387,7 +387,7 @@ ScDocument::~ScDocument()
pScriptTypeData.reset();
maNonThreaded.xRecursionHelper.reset();
- maThreadSpecific.xRecursionHelper.reset();
+ assert(!maThreadSpecific.xRecursionHelper);
pPreviewFont.reset();
SAL_WARN_IF( pAutoNameCache, "sc.core", "AutoNameCache still set in dtor" );