New Defects reported by Coverity Scan for LibreOffice

Stephan Bergmann sbergman at redhat.com
Tue Oct 16 16:08:15 UTC 2018


On 16/10/2018 16:03, Caolán McNamara wrote:
> On Tue, 2018-10-16 at 12:33 +0000, scan-admin at coverity.com wrote:
>>
>> ** CID 1440303:  Error handling issues  (UNCAUGHT_EXCEPT)
>> /sc/source/core/data/column3.cxx: 2394 in
>> <unnamed>::FormulaToValueHandler::Entry::Entry(<unnamed>::FormulaToVa
>> lueHandler::Entry&&)()
> 
> FWIW I think the const-ing up of loplugin:constfields effectively
> disables move constructors
> 
> 
> https://www.chromium.org/rvalue-references?tmpl=%2Fsystem%2Fapp%2Ftemplates%2Fprint%2F&showPrintDialog=1#TOC-8.-Move-constructors-will-only-bind-to-non-const-rvalues
> .

the poor consequences of loplugin:constfields notwithstanding, i think 
the coverity warning is bogus or incomplete:  ScCellValue's both copy 
and move ctors are potentially throwing, so Entry's impl defined move 
ctor may indeed throw an exception, but will impl have a potentially 
throwing exception spec (whether or not Entry's

>         ScCellValue const maValue;

member is const).  and the coverity analysis doesnt show that such an 
exception isnt caught, but claims "If the exception is ever thrown, the 
program will crash."


More information about the LibreOffice mailing list