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

New Defects reported by Coverity Scan for HPCC-Platform on 22nd of January

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: Plugins, Roxie
    • Labels:
      None
    • Environment:
      OBT

      Description

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

      *** CID 1464301:  Null pointer dereferences  (FORWARD_NULL)
      
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/roxie/ccd/ccdfile.cpp: 2137 in CResolvedFile::getTranslators(int, IOutputMetaData *, IOutputMetaData *, RecordTranslationMode, bool) const()
      
      2131                             if (!translator || !translator->canTranslate())
      
      2132                                 throw MakeStringException(ROXIE_MISMATCH, "Untranslatable record layout mismatch detected for file %s", subname);
      
      2133                             if (translator->needsTranslate())
      
      2134                             \{
      
      2135                                 if (mode == RecordTranslationMode::None)
      
      2136                                     throw MakeStringException(ROXIE_MISMATCH, "Translatable record layout mismatch detected for file %s, but translation disabled", subname);
      
      >>>     CID 1464301:  Null pointer dereferences  (FORWARD_NULL)
      
      >>>     Passing null pointer "actual" to "queryRecordAccessor", which
      
      >>> dereferences it. (The dereference happens because this is a virtual
      
      >>> function call.)
      
      2137                                 keyedTranslator.setown(createKeyTranslator(actual->queryRecordAccessor(true), expected->queryRecordAccessor(true))); // NOTE - index cases should check (elsewhere) that this is empty.
      
      2138                                 if (isIndex && keyedTranslator->needsTranslate())
      
      2139                                     throw MakeStringException(ROXIE_MISMATCH, "Record layout mismatch detected in keyed fields for file %s", subname);
      
      2140
      
      2141                             }
      
      2142                         }
      
       
      ________________________________________________________________________________________________________
      
      *** CID 1464302:  Uninitialized members  (UNINIT_CTOR)
      
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/plugins/py3embed/py3embed.cpp: 271 in py3embed::Python3xGlobalState::Python3xGlobalState()()
      
      265             // If Py_Initialize is called when stdin is set to a directory, it calls exit()
      
      266             // We don't want that to happen - just disable Python support in such situations
      
      267             struct stat sb;
      
      268             if (fstat(fileno(stdin), &sb) == 0 && S_ISDIR(sb.st_mode))
      
      269             \{
      
      270                 initialized = false;
      
      >>>     CID 1464302:  Uninitialized members  (UNINIT_CTOR)
      
      >>>     Non-static class member "tstate" is not initialized in this constructor nor in any functions that it calls.
      
      271                 return;
      
      272             }
      
      273     #endif
      
      274     #ifndef _WIN32
      
      275             // We need to ensure all symbols in the python3.x so are loaded - due to bugs in some distro's python installations
      
      276             // However this will likely break python2.
      
      

      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-2FlEFg5vqux4F9sWhSTNMLlYwA3S7QsCYeK-2BEowwYMQTU2bML-2F4FRlMe7qSGKGv3HChjXNc9FIPIz2zmwXyso2cH1wnT78beUZyt-2F8tfrYnUcNuE46HG1gSyosvZjX5-2FipMev96GtOWpY4WnXDOIPjDCM3ivUoOJPOW-2Bcr7u7DBacT1NtukDqnmZuSvE00d8-2BiEFhI-2BzLVCviNg-3D

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: