New Defects reported by Coverity Scan for RTEMS-Tools

scan-admin at coverity.com scan-admin at coverity.com
Wed Jul 14 17:23:38 UTC 2021


Hi,

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

4 new defect(s) introduced to RTEMS-Tools found with Coverity Scan.
2 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 4 of 4 defect(s)


** CID 1505940:  API usage errors  (STREAM_FORMAT_STATE)
/tester/covoar/ReportsText.cc: 255 in Coverage::ReportsText::PutSymbolSummaryLine(std::basic_ofstream<char, std::char_traits<char>> &, unsigned int, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const Coverage::SymbolInformation &)()


________________________________________________________________________________________________________
*** CID 1505940:  API usage errors  (STREAM_FORMAT_STATE)
/tester/covoar/ReportsText.cc: 255 in Coverage::ReportsText::PutSymbolSummaryLine(std::basic_ofstream<char, std::char_traits<char>> &, unsigned int, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const Coverage::SymbolInformation &)()
249                << "Percentage Uncovered Bytes        : "
250                << uncoveredBytes << std::endl;
251     
252       report << "============================================" << std::endl;
253       }
254     
>>>     CID 1505940:  API usage errors  (STREAM_FORMAT_STATE)
>>>     Changing format state of stream "report" for categories floatfield, precision without later restoring it.
255       return true;
256     }
257     

** CID 1505939:  API usage errors  (STREAM_FORMAT_STATE)
/tester/covoar/ReportsHtml.cc: 800 in Coverage::ReportsHtml::PutSymbolSummaryLine(std::basic_ofstream<char, std::char_traits<char>> &, unsigned int, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const Coverage::SymbolInformation &)()


________________________________________________________________________________________________________
*** CID 1505939:  API usage errors  (STREAM_FORMAT_STATE)
/tester/covoar/ReportsHtml.cc: 800 in Coverage::ReportsHtml::PutSymbolSummaryLine(std::basic_ofstream<char, std::char_traits<char>> &, unsigned int, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const Coverage::SymbolInformation &)()
794                    << ( symbolInfo.stats.uncoveredBytes * 100.0 ) /
795                         symbolInfo.stats.sizeInBytes
796                    << "</td>" << std::endl;
797         }
798     
799         report << "</tr>" << std::endl;
>>>     CID 1505939:  API usage errors  (STREAM_FORMAT_STATE)
>>>     Changing format state of stream "report" for categories floatfield, precision without later restoring it.
800         return true;
801       }
802     
803       void ReportsHtml::CloseAnnotatedFile(
804         std::ofstream& aFile
805       )

** CID 1505938:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1505938:  Null pointer dereferences  (FORWARD_NULL)
/tester/covoar/ReportsBase.cc: 237 in Coverage::ReportsBase::WriteAnnotatedReport(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&)()
231         if ((info.uncoveredRanges == NULL) &&
232             (info.uncoveredBranches == NULL))
233           continue;
234     
235         // If uncoveredRanges and uncoveredBranches are empty, then everything
236         // must have been covered for this symbol.  Just skip it.
>>>     CID 1505938:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "info.uncoveredRanges->set" to "empty", which dereferences it.
237         if ((info.uncoveredRanges->set.empty()) &&
238             (info.uncoveredBranches->set.empty()))
239           continue;
240     
241         theCoverageMap = info.unifiedCoverageMap;
242         bAddress = info.baseAddress;

** CID 1505937:  Uninitialized members  (UNINIT_CTOR)
/tester/covoar/ReportsHtml.cc: 41 in Coverage::ReportsHtml::ReportsHtml(long, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&)()


________________________________________________________________________________________________________
*** CID 1505937:  Uninitialized members  (UNINIT_CTOR)
/tester/covoar/ReportsHtml.cc: 41 in Coverage::ReportsHtml::ReportsHtml(long, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&)()
35     namespace Coverage {
36     
37       ReportsHtml::ReportsHtml( time_t timestamp, const std::string& symbolSetName ):
38         ReportsBase( timestamp, symbolSetName )
39       {
40         reportExtension_m = ".html";
>>>     CID 1505937:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "lastState_m" is not initialized in this constructor nor in any functions that it calls.
41       }
42     
43       ReportsHtml::~ReportsHtml()
44       {
45       }
46     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypUUzi-2FdSNmuyRB7BEFT8xQi8c7-2B1U0roIV5G3HXifs2odF2CS2aZ-2FK5CtfMSQ5p34-3DUHsK_EU3W9teASMK00lBXX9WT4lsogDrkCcNZLvg-2FVxwAXMqFMTmldlt3v8b97BWCuTk6Bl8JGpUwPqY50TKu8FEuj94uKBUJO9CUjW3GGrT9mH-2FGfXxZMYQoAgK-2FsirlP6DV6i1V6iWqaeq8ZEeKduNTNH9V-2BG2Gd5AkWn2sVoYvPrC1kO63MhMMLQNMRnNXPOf3nNCorBw6bxd4mMpeDx8lag-3D-3D



More information about the build mailing list