summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-31 15:39:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-31 20:26:01 +0200
commitdc73583573a31078c8408e820d749aaeab25bc32 (patch)
tree1d92ae3e33a7a293507bff8b1e95024fc4352482 /sc
parent42bf893a8479f70d7d8f00e03105ce15e8545f8b (diff)
crash-testing fdo86059-1.xlsx
blind fix since I can't reproduce. But I can see from the reported threads that two different threads are entering SfxItemPool::Put and consequently the debug runtime throws an iterator exception. Change-Id: Idaa6a93b134edc49bda8cd7876bb216d5aec7037 Reviewed-on: https://gerrit.libreoffice.org/73272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table1.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index be7d12b50150..b899bbb91cbf 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -2554,6 +2554,10 @@ ScColumnsRange ScTable::GetColumnsRange(SCCOL nColBegin, SCCOL nColEnd) const
// out-of-line the cold part of the CreateColumnIfNotExists function
void ScTable::CreateColumnIfNotExistsImpl( const SCCOL nScCol ) const
{
+ // When doing multi-threaded load of, e.g. XLS files, we can hit this, which calls
+ // into SfxItemPool::Put, in parallel with other code that calls into SfxItemPool::Put,
+ // which is bad since that code is not thread-safe.
+ SolarMutexGuard aGuard;
const SCCOL aOldColSize = aCol.size();
aCol.resize( static_cast< size_t >( nScCol + 1 ) );
for (SCCOL i = aOldColSize; i <= nScCol; i++)