Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-18908

New Defects reported by Coverity Scan for HPCC-Platform on 18th of December

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: eclcc, Roxie, unittests
    • Labels:
      None
    • Environment:
      OBT

      Description

      3 new defect(s) introduced to HPCC-Platform found with Coverity Scan.

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

      ** CID 1463025:  Uninitialized members  (UNINIT_CTOR)
      
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/testing/unittests/unittests.cpp: 316 in PtreeThreadingStressTest::_testContention(unsigned char)::casyncfor::casyncfor(const char *, unsigned char, PtreeThreadingStressTest::_testContention(unsigned char)::ContentionMode, int)()
      ________________________________________________________________________________________________________
      
      *** CID 1463025:  Uninitialized members  (UNINIT_CTOR)
      
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/testing/unittests/unittests.cpp: 316 in PtreeThreadingStressTest::_testContention(unsigned char)::casyncfor::casyncfor(const char *, unsigned char, PtreeThreadingStressTest::_testContention(unsigned char)::ContentionMode, int)()
      
      310                 const char *desc = nullptr;
      
      311
      
      312             public:
      
      313                 casyncfor(const char *_desc, byte _flags, ContentionMode _mode, int _iter)
      
      314                 : flags(_flags), mode(_mode), iterations(_iter), desc(_desc)
      
      315                 {
      
      >>>     CID 1463025:  Uninitialized members  (UNINIT_CTOR)
      
      >>>     Non-static class member "v" is not initialized in this constructor nor in any functions that it calls.
      
      316                 };
      
      317                 double For(unsigned num, unsigned maxatonce, double overhead = 0.0)
      
      318                 {
      
      319                     unsigned start = msTick();
      
      320                     CAsyncFor::For(num, maxatonce);
      
      321                     unsigned elapsed = msTick()-start;
      
      
      ________________________________________________________________________________________________________
      
      ** CID 1463024:  Null pointer dereferences  (FORWARD_NULL)
      
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/tools/hidl/hidlgram.y: 247 in yyparse()()
      
      
      *** CID 1463024:  Null pointer dereferences  (FORWARD_NULL)
      
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/tools/hidl/hidlgram.y: 247 in yyparse()()
      
      241              }
      
      242
      
      243             method->next=CurService->methods;
      
      244             CurService->methods=method;
      
      245
      
      246             CurMetaTags   = NULL;
      
      >>>     CID 1463024:  Null pointer dereferences  (FORWARD_NULL)
      
      >>>     Assigning: "CurEspMessage" = "NULL".
      
      247             CurEspMessage = NULL;
      
      248         }
      
      249      }
      
      250      ;
      
      251
      
      252     EspServiceBody
      
       
      ________________________________________________________________________________________________________
      
      ** CID 1463023:  Null pointer dereferences  (FORWARD_NULL)
      
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/roxie/ccd/ccdfile.cpp: 2150 in CResolvedFile::getTranslators(int, IOutputMetaData *, IOutputMetaData *, IRecordLayoutTranslator::Mode) const()
      
      
      *** CID 1463023:  Null pointer dereferences  (FORWARD_NULL)
      
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/roxie/ccd/ccdfile.cpp: 2150 in CResolvedFile::getTranslators(int, IOutputMetaData *, IOutputMetaData *, IRecordLayoutTranslator::Mode) const()
      
      2144                                 translator.setown(createRecordTranslator(projected->queryRecordAccessor(true), actual->queryRecordAccessor(true)));
      
      2145                                 // translator->describe();
      
      2146                             }
      
      2147                             if (!translator || !translator->canTranslate())
      
      2148                                 throw MakeStringException(ROXIE_MISMATCH, "Untranslatable record layout mismatch detected for file %s", subname);
      
      2149                             if (translator->needsTranslate())
      
      >>>     CID 1463023:  Null pointer dereferences  (FORWARD_NULL)
      
      >>>     Passing null pointer "actual" to "queryRecordAccessor", which
      
      >>> dereferences it. (The dereference happens because this is a virtual
      
      >>> function call.)
      
      2150                                 keyedTranslator.setown(createKeyTranslator(actual->queryRecordAccessor(true), expected->queryRecordAccessor(true)));
      
      2151                         }
      
      2152                     }
      
      2153                     prevFormatCrc = thisFormatCrc;
      
      2154                 }
      
      2155                 result->addTranslator(LINK(translator), LINK(keyedTranslator), LINK(actual));
      
      

      To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRaNjvQL1JwbRRXECNADpFWbJmd1u5Ft08MVOUAWsoMXj3-2FOk3grCOW6BgQyMmqdP24-3D_V7u2yOhiGAr-2Biu54nFTzz1cdmowKR-2FlEFg5vqux4F9u8Dnqfi-2BoiGEdauBwuvUrbLHIQGEoeusSAI33adtSUFuCx1YBq2DUxTaStT53UGmM2-2FM6T9GW01OqMc8WL0m-2BJrPDZpAjMgLM3ygXM-2BxEFdJh20YsDIILYQrh99HAkTU8a4iloVUTYeezIVqzbQqqBAtikYnmsWCxEik-2FHQv9pAuxfu-2FQ-2Faukv-2B04MpwoabWc-3D

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              attilavamos Attila Vamos
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: