New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sun Mar 23 01:31:17 UTC 2025


Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.

23 new defect(s) introduced to LibreOffice found with Coverity Scan.
5 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 20 of 23 defect(s)


** CID 1645104:  Concurrent data access violations  (MISSING_LOCK)
/drawinglayer/source/primitive2d/BufferedDecompositionGroupPrimitive2D.cxx: 49 in drawinglayer::primitive2d::BufferedDecompositionGroupPrimitive2D::setBuffered2DDecomposition(drawinglayer::primitive2d::Primitive2DContainer &&)()


________________________________________________________________________________________________________
*** CID 1645104:  Concurrent data access violations  (MISSING_LOCK)
/drawinglayer/source/primitive2d/BufferedDecompositionGroupPrimitive2D.cxx: 49 in drawinglayer::primitive2d::BufferedDecompositionGroupPrimitive2D::setBuffered2DDecomposition(drawinglayer::primitive2d::Primitive2DContainer &&)()
43             // no flush used, just set
44             maBuffered2DDecomposition = std::move(rNew);
45         }
46         else
47         {
48             // decomposition changed, touch
>>>     CID 1645104:  Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "this->maLastAccess" without holding lock "drawinglayer::primitive2d::BufferedDecompositionGroupPrimitive2D.maCallbackLock". Elsewhere, "drawinglayer::primitive2d::BufferedDecompositionGroupPrimitive2D.maLastAccess" is written to with "BufferedDecompositionGroupPrimitive2D.maCallbackLock" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
49             maLastAccess = std::chrono::steady_clock::now();
50             BufferedDecompositionFlusher::update(this);
51     
52             // tdf#158913 need to secure change when flush/multithreading is in use
53             std::lock_guard Guard(maCallbackLock);
54             maBuffered2DDecomposition = std::move(rNew);

** CID 1645103:  Uninitialized members  (UNINIT_CTOR)
/framework/source/services/frame.cxx: 591 in <unnamed>::XFrameImpl::loadComponentFromURL(const rtl::OUString &, const rtl::OUString &, int, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)::[lambda() (instance 1)]::lambda([lambda() (instance 1)]&&)()


________________________________________________________________________________________________________
*** CID 1645103:  Uninitialized members  (UNINIT_CTOR)
/framework/source/services/frame.cxx: 591 in <unnamed>::XFrameImpl::loadComponentFromURL(const rtl::OUString &, const rtl::OUString &, int, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)::[lambda() (instance 1)]::lambda([lambda() (instance 1)]&&)()
585         {
586             // Make sure that we own the solar mutex, otherwise later
587             // vcl::SolarThreadExecutor::execute() will release the solar mutex, even if it's owned by
588             // another thread, leading to an std::abort() at the end.
589             SolarMutexGuard g;
590     
>>>     CID 1645103:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
591             return vcl::solarthread::syncExecute([this, xThis, sURL, sTargetFrameName, nSearchFlags, lArguments] {
592                 return LoadEnv::loadComponentFromURL(xThis, m_xContext, sURL, sTargetFrameName,
593                                                      nSearchFlags, lArguments);
594             });
595         }
596         else

** CID 1645102:  Uninitialized members  (UNINIT_CTOR)
/framework/source/services/desktop.cxx: 586 in framework::Desktop::loadComponentFromURL(const rtl::OUString &, const rtl::OUString &, int, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)::[lambda() (instance 1)]::lambda(const [lambda() (instance 1)]&)()


________________________________________________________________________________________________________
*** CID 1645102:  Uninitialized members  (UNINIT_CTOR)
/framework/source/services/desktop.cxx: 586 in framework::Desktop::loadComponentFromURL(const rtl::OUString &, const rtl::OUString &, int, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)::[lambda() (instance 1)]::lambda(const [lambda() (instance 1)]&)()
580         {
581             // Make sure that we own the solar mutex, otherwise later
582             // vcl::SolarThreadExecutor::execute() will release the solar mutex, even if it's owned by
583             // another thread, leading to an std::abort() at the end.
584             SolarMutexGuard g;
585     
>>>     CID 1645102:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
586             return vcl::solarthread::syncExecute([this, xThis, sURL, sTargetFrameName, nSearchFlags, lArguments] {
587                 return LoadEnv::loadComponentFromURL(xThis, m_xContext, sURL, sTargetFrameName,
588                                                      nSearchFlags, lArguments);
589             });
590         }
591         else

** CID 1645101:  Concurrent data access violations  (MISSING_LOCK)
/comphelper/source/property/propshlp.cxx: 578 in comphelper::OPropertySetHelper::fire(std::unique_lock<std::mutex> &, const int *, const com::sun::star::uno::Any *, const com::sun::star::uno::Any *, int, bool)()


________________________________________________________________________________________________________
*** CID 1645101:  Concurrent data access violations  (MISSING_LOCK)
/comphelper/source/property/propshlp.cxx: 578 in comphelper::OPropertySetHelper::fire(std::unique_lock<std::mutex> &, const int *, const com::sun::star::uno::Any *, const com::sun::star::uno::Any *, int, bool)()
572         // reduce array to changed properties
573         aEvts.realloc(nChangesLen);
574     
575         if (bVetoable)
576             return;
577     
>>>     CID 1645101:  Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "this->maPropertiesChangeListeners" without holding lock "comphelper::UnoImplBase.m_aMutex". Elsewhere, "comphelper::OPropertySetHelper.maPropertiesChangeListeners" is written to with "UnoImplBase.m_aMutex" held 2 out of 2 times.
578         if (!maPropertiesChangeListeners.getLength(rGuard))
579             return;
580     
581         // Here is a Bug, unbound properties are also fired
582         OInterfaceIteratorHelper4 aIt(rGuard, maPropertiesChangeListeners);
583         rGuard.unlock();

** CID 1645100:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 220 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 4)]::operator ()()()


________________________________________________________________________________________________________
*** CID 1645100:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 220 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 4)]::operator ()()()
214                 GenerateNumbers(rng, STR_DISTRIBUTION_NORMAL, aDecimalPlaces);
215                 break;
216             }
217             case DIST_CAUCHY:
218             {
219                 std::cauchy_distribution<> distribution(parameter1);
>>>     CID 1645100:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Capturing variable "seed" of type "std::mt19937" (size 5000 bytes) by value, which exceeds the high threshold of 512 bytes.
220                 auto rng = [&distribution, seed]() mutable
221                 {
222                     return distribution(seed);
223                 };
224                 GenerateNumbers(rng, STR_DISTRIBUTION_CAUCHY, aDecimalPlaces);
225                 break;

** CID 1645099:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 260 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 8)]::operator ()()()


________________________________________________________________________________________________________
*** CID 1645099:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 260 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 8)]::operator ()()()
254                 GenerateNumbers(rng, STR_DISTRIBUTION_CHI_SQUARED, aDecimalPlaces);
255                 break;
256             }
257             case DIST_GEOMETRIC:
258             {
259                 std::geometric_distribution<> distribution(parameter1);
>>>     CID 1645099:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Capturing variable "seed" of type "std::mt19937" (size 5000 bytes) by value, which exceeds the high threshold of 512 bytes.
260                 auto rng = [&distribution, seed]() mutable
261                 {
262                     return distribution(seed);
263                 };
264                 GenerateNumbers(rng, STR_DISTRIBUTION_GEOMETRIC, aDecimalPlaces);
265                 break;

** CID 1645098:  Concurrent data access violations  (MISSING_LOCK)
/comphelper/source/property/propshlp.cxx: 561 in comphelper::OPropertySetHelper::fire(std::unique_lock<std::mutex> &, const int *, const com::sun::star::uno::Any *, const com::sun::star::uno::Any *, int, bool)()


________________________________________________________________________________________________________
*** CID 1645098:  Concurrent data access violations  (MISSING_LOCK)
/comphelper/source/property/propshlp.cxx: 561 in comphelper::OPropertySetHelper::fire(std::unique_lock<std::mutex> &, const int *, const com::sun::star::uno::Any *, const com::sun::star::uno::Any *, int, bool)()
555         {
556             if (bVetoable) // fire change Events?
557                 fireVetoableChangeListeners(
558                     rGuard, aVetoableLC.getContainer(rGuard, pEvts[i].PropertyHandle), pEvts[i]);
559             else
560                 // get the listener container for the property name
>>>     CID 1645098:  Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "this->aBoundLC" without holding lock "comphelper::UnoImplBase.m_aMutex". Elsewhere, "comphelper::OPropertySetHelper.aBoundLC" is written to with "UnoImplBase.m_aMutex" held 1 out of 1 times.
561                 firePropertyChangeListeners(
562                     rGuard, aBoundLC.getContainer(rGuard, pEvts[i].PropertyHandle), pEvts[i]);
563     
564             // broadcast to all listeners with "" property name
565             if (bVetoable)
566                 // fire change Events?

** CID 1645097:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 280 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 10)]::operator ()()()


________________________________________________________________________________________________________
*** CID 1645097:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 280 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 10)]::operator ()()()
274                 GenerateNumbers(rng, STR_DISTRIBUTION_NEGATIVE_BINOMIAL, aDecimalPlaces);
275                 break;
276             }
277             case DIST_POISSON:
278             {
279                 std::poisson_distribution<> distribution(parameter1);
>>>     CID 1645097:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Capturing variable "seed" of type "std::mt19937" (size 5000 bytes) by value, which exceeds the high threshold of 512 bytes.
280                 auto rng = [&distribution, seed]() mutable
281                 {
282                     return distribution(seed);
283                 };
284                 GenerateNumbers(rng, STR_DISTRIBUTION_POISSON, aDecimalPlaces);
285                 break;

** CID 1645096:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 240 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 6)]::operator ()()()


________________________________________________________________________________________________________
*** CID 1645096:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 240 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 6)]::operator ()()()
234                 GenerateNumbers(rng, STR_DISTRIBUTION_BERNOULLI, aDecimalPlaces);
235                 break;
236             }
237             case DIST_BINOMIAL:
238             {
239                 std::binomial_distribution<> distribution(parameterInteger2, parameter1);
>>>     CID 1645096:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Capturing variable "seed" of type "std::mt19937" (size 5000 bytes) by value, which exceeds the high threshold of 512 bytes.
240                 auto rng = [&distribution, seed]() mutable
241                 {
242                     return distribution(seed);
243                 };
244                 GenerateNumbers(rng, STR_DISTRIBUTION_BINOMIAL, aDecimalPlaces);
245                 break;

** CID 1645095:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 250 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 7)]::operator ()()()


________________________________________________________________________________________________________
*** CID 1645095:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 250 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 7)]::operator ()()()
244                 GenerateNumbers(rng, STR_DISTRIBUTION_BINOMIAL, aDecimalPlaces);
245                 break;
246             }
247             case DIST_CHI_SQUARED:
248             {
249                 std::chi_squared_distribution<> distribution(parameter1);
>>>     CID 1645095:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Capturing variable "seed" of type "std::mt19937" (size 5000 bytes) by value, which exceeds the high threshold of 512 bytes.
250                 auto rng = [&distribution, seed]() mutable
251                 {
252                     return distribution(seed);
253                 };
254                 GenerateNumbers(rng, STR_DISTRIBUTION_CHI_SQUARED, aDecimalPlaces);
255                 break;

** CID 1645094:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 190 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 1)]::operator ()()()


________________________________________________________________________________________________________
*** CID 1645094:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 190 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 1)]::operator ()()()
184     
185         switch(aSelectedId)
186         {
187             case DIST_UNIFORM:
188             {
189                 std::uniform_real_distribution<> distribution(parameter1, parameter2);
>>>     CID 1645094:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Capturing variable "seed" of type "std::mt19937" (size 5000 bytes) by value, which exceeds the high threshold of 512 bytes.
190                 auto rng = [&distribution, seed]() mutable
191                 {
192                     return distribution(seed);
193                 };
194                 GenerateNumbers(rng, STR_DISTRIBUTION_UNIFORM_REAL, aDecimalPlaces);
195                 break;

** CID 1645093:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 230 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 5)]::operator ()()()


________________________________________________________________________________________________________
*** CID 1645093:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 230 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 5)]::operator ()()()
224                 GenerateNumbers(rng, STR_DISTRIBUTION_CAUCHY, aDecimalPlaces);
225                 break;
226             }
227             case DIST_BERNOULLI:
228             {
229                 std::bernoulli_distribution distribution(parameter1);
>>>     CID 1645093:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Capturing variable "seed" of type "std::mt19937" (size 5000 bytes) by value, which exceeds the high threshold of 512 bytes.
230                 auto rng = [&distribution, seed]() mutable
231                 {
232                     return distribution(seed);
233                 };
234                 GenerateNumbers(rng, STR_DISTRIBUTION_BERNOULLI, aDecimalPlaces);
235                 break;

** CID 1645092:  Uninitialized members  (UNINIT_CTOR)
/framework/source/services/desktop.cxx: 586 in framework::Desktop::loadComponentFromURL(const rtl::OUString &, const rtl::OUString &, int, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)::[lambda() (instance 1)]::lambda([lambda() (instance 1)]&&)()


________________________________________________________________________________________________________
*** CID 1645092:  Uninitialized members  (UNINIT_CTOR)
/framework/source/services/desktop.cxx: 586 in framework::Desktop::loadComponentFromURL(const rtl::OUString &, const rtl::OUString &, int, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)::[lambda() (instance 1)]::lambda([lambda() (instance 1)]&&)()
580         {
581             // Make sure that we own the solar mutex, otherwise later
582             // vcl::SolarThreadExecutor::execute() will release the solar mutex, even if it's owned by
583             // another thread, leading to an std::abort() at the end.
584             SolarMutexGuard g;
585     
>>>     CID 1645092:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
586             return vcl::solarthread::syncExecute([this, xThis, sURL, sTargetFrameName, nSearchFlags, lArguments] {
587                 return LoadEnv::loadComponentFromURL(xThis, m_xContext, sURL, sTargetFrameName,
588                                                      nSearchFlags, lArguments);
589             });
590         }
591         else

** CID 1645091:  Uninitialized members  (UNINIT_CTOR)
/framework/source/services/frame.cxx: 591 in <unnamed>::XFrameImpl::loadComponentFromURL(const rtl::OUString &, const rtl::OUString &, int, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)::[lambda() (instance 1)]::lambda(const [lambda() (instance 1)]&)()


________________________________________________________________________________________________________
*** CID 1645091:  Uninitialized members  (UNINIT_CTOR)
/framework/source/services/frame.cxx: 591 in <unnamed>::XFrameImpl::loadComponentFromURL(const rtl::OUString &, const rtl::OUString &, int, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)::[lambda() (instance 1)]::lambda(const [lambda() (instance 1)]&)()
585         {
586             // Make sure that we own the solar mutex, otherwise later
587             // vcl::SolarThreadExecutor::execute() will release the solar mutex, even if it's owned by
588             // another thread, leading to an std::abort() at the end.
589             SolarMutexGuard g;
590     
>>>     CID 1645091:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
591             return vcl::solarthread::syncExecute([this, xThis, sURL, sTargetFrameName, nSearchFlags, lArguments] {
592                 return LoadEnv::loadComponentFromURL(xThis, m_xContext, sURL, sTargetFrameName,
593                                                      nSearchFlags, lArguments);
594             });
595         }
596         else

** CID 1645090:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 270 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 9)]::operator ()()()


________________________________________________________________________________________________________
*** CID 1645090:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 270 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 9)]::operator ()()()
264                 GenerateNumbers(rng, STR_DISTRIBUTION_GEOMETRIC, aDecimalPlaces);
265                 break;
266             }
267             case DIST_NEGATIVE_BINOMIAL:
268             {
269                 std::negative_binomial_distribution<> distribution(parameterInteger2, parameter1);
>>>     CID 1645090:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Capturing variable "seed" of type "std::mt19937" (size 5000 bytes) by value, which exceeds the high threshold of 512 bytes.
270                 auto rng = [&distribution, seed]() mutable
271                 {
272                     return distribution(seed);
273                 };
274                 GenerateNumbers(rng, STR_DISTRIBUTION_NEGATIVE_BINOMIAL, aDecimalPlaces);
275                 break;

** CID 1645089:  Concurrent data access violations  (MISSING_LOCK)
/comphelper/source/property/propshlp.cxx: 569 in comphelper::OPropertySetHelper::fire(std::unique_lock<std::mutex> &, const int *, const com::sun::star::uno::Any *, const com::sun::star::uno::Any *, int, bool)()


________________________________________________________________________________________________________
*** CID 1645089:  Concurrent data access violations  (MISSING_LOCK)
/comphelper/source/property/propshlp.cxx: 569 in comphelper::OPropertySetHelper::fire(std::unique_lock<std::mutex> &, const int *, const com::sun::star::uno::Any *, const com::sun::star::uno::Any *, int, bool)()
563     
564             // broadcast to all listeners with "" property name
565             if (bVetoable)
566                 // fire change Events?
567                 fireVetoableChangeListeners(rGuard, &maVetoableChangeListeners, pEvts[i]);
568             else
>>>     CID 1645089:  Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "this->maPropertyChangeListeners" without holding lock "comphelper::UnoImplBase.m_aMutex". Elsewhere, "comphelper::OPropertySetHelper.maPropertyChangeListeners" is written to with "UnoImplBase.m_aMutex" held 2 out of 2 times.
569                 firePropertyChangeListeners(rGuard, &maPropertyChangeListeners, pEvts[i]);
570         }
571     
572         // reduce array to changed properties
573         aEvts.realloc(nChangesLen);
574     

** CID 1645088:    (MISSING_LOCK)
/drawinglayer/source/primitive2d/BufferedDecompositionFlusher.cxx: 123 in drawinglayer::primitive2d::BufferedDecompositionFlusher::onShot()()
/drawinglayer/source/primitive2d/BufferedDecompositionFlusher.cxx: 113 in drawinglayer::primitive2d::BufferedDecompositionFlusher::onShot()()


________________________________________________________________________________________________________
*** CID 1645088:    (MISSING_LOCK)
/drawinglayer/source/primitive2d/BufferedDecompositionFlusher.cxx: 123 in drawinglayer::primitive2d::BufferedDecompositionFlusher::onShot()()
117                 }
118                 else
119                     ++it;
120             }
121             for (auto it = maRegistered2.begin(); it != maRegistered2.end();)
122             {
>>>     CID 1645088:    (MISSING_LOCK)
>>>     Accessing "(*it)->maLastAccess" without holding lock "drawinglayer::primitive2d::BufferedDecompositionGroupPrimitive2D.maCallbackLock". Elsewhere, "drawinglayer::primitive2d::BufferedDecompositionGroupPrimitive2D.maLastAccess" is written to with "BufferedDecompositionGroupPrimitive2D.maCallbackLock" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
123                 if (aNow - (*it)->maLastAccess > std::chrono::seconds(10))
124                 {
125                     aRemoved2.push_back(*it);
126                     it = maRegistered2.erase(it);
127                 }
128                 else
/drawinglayer/source/primitive2d/BufferedDecompositionFlusher.cxx: 113 in drawinglayer::primitive2d::BufferedDecompositionFlusher::onShot()()
107         std::vector<rtl::Reference<BufferedDecompositionPrimitive2D>> aRemoved1;
108         std::vector<rtl::Reference<BufferedDecompositionGroupPrimitive2D>> aRemoved2;
109         {
110             std::unique_lock l(maMutex);
111             for (auto it = maRegistered1.begin(); it != maRegistered1.end();)
112             {
>>>     CID 1645088:    (MISSING_LOCK)
>>>     Accessing "(*it)->maLastAccess" without holding lock "drawinglayer::primitive2d::BufferedDecompositionPrimitive2D.maCallbackLock". Elsewhere, "drawinglayer::primitive2d::BufferedDecompositionPrimitive2D.maLastAccess" is written to with "BufferedDecompositionPrimitive2D.maCallbackLock" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
113                 if (aNow - (*it)->maLastAccess > std::chrono::seconds(10))
114                 {
115                     aRemoved1.push_back(*it);
116                     it = maRegistered1.erase(it);
117                 }
118                 else

** CID 1645087:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 200 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 2)]::operator ()()()


________________________________________________________________________________________________________
*** CID 1645087:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx: 200 in ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()::[lambda() (instance 2)]::operator ()()()
194                 GenerateNumbers(rng, STR_DISTRIBUTION_UNIFORM_REAL, aDecimalPlaces);
195                 break;
196             }
197             case DIST_UNIFORM_INTEGER:
198             {
199                 std::uniform_int_distribution<sal_Int64> distribution(parameterInteger1, parameterInteger2);
>>>     CID 1645087:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Capturing variable "seed" of type "std::mt19937" (size 5000 bytes) by value, which exceeds the high threshold of 512 bytes.
200                 auto rng = [&distribution, seed]() mutable
201                 {
202                     return distribution(seed);
203                 };
204                 GenerateNumbers(rng, STR_DISTRIBUTION_UNIFORM_INTEGER, aDecimalPlaces);
205                 break;

** CID 1645086:  Concurrent data access violations  (MISSING_LOCK)
/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx: 49 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::setBuffered2DDecomposition(rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>)()


________________________________________________________________________________________________________
*** CID 1645086:  Concurrent data access violations  (MISSING_LOCK)
/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx: 49 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::setBuffered2DDecomposition(rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D>)()
43             // no flush used, just set
44             maBuffered2DDecomposition = std::move(rNew);
45         }
46         else
47         {
48             // decomposition changed, touch
>>>     CID 1645086:  Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "this->maLastAccess" without holding lock "drawinglayer::primitive2d::BufferedDecompositionPrimitive2D.maCallbackLock". Elsewhere, "drawinglayer::primitive2d::BufferedDecompositionPrimitive2D.maLastAccess" is written to with "BufferedDecompositionPrimitive2D.maCallbackLock" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
49             maLastAccess = std::chrono::steady_clock::now();
50             BufferedDecompositionFlusher::update(this);
51     
52             // tdf#158913 need to secure change when flush/multithreading is in use
53             std::lock_guard Guard(maCallbackLock);
54             maBuffered2DDecomposition = std::move(rNew);

** CID 1645085:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1645085:  Null pointer dereferences  (NULL_RETURNS)
/sc/source/ui/view/dbfunc.cxx: 461 in ScDBFunc::ClearAutoFilter()()
455         SCROW nRow = GetViewData().GetCurY();
456         SCTAB nTab = GetViewData().GetTabNo();
457     
458         ScDBData* pDBData = rDoc.GetDBAtCursor(nCol, nRow, nTab, ScDBDataPortion::AREA);
459     
460         ScQueryParam aParam;
>>>     CID 1645085:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "nullptr" "pDBData" when calling "GetQueryParam".
461         pDBData->GetQueryParam(aParam);
462     
463         aParam.RemoveAllEntriesByField(nCol);
464         aParam.eSearchType = utl::SearchParam::SearchType::Normal;
465         aParam.bCaseSens = false;
466         aParam.bDuplicate = true;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libreoffice?tab=overview



More information about the LibreOffice mailing list