View Issue Details

IDProjectCategoryView StatusLast Update
0033033Open CASCADEOCCT:Codingpublic2023-08-01 15:09
Reporteralukin Assigned Toalukin  
PrioritynormalSeverityintegration request 
Status newResolutionopen 
Product Version7.6.0 
Target VersionUnscheduled 
Summary0033033: Coding - collect and fix CppCheck issues - errors
DescriptionCheck potential issues and fix them if necessary.
OCCT revision: 63fa56bc83f2f366068fd2e67fce3ea4ff0c5ee3

In 33024.xlsx (Sheet tab) the following errors:
1.
- ctuuninitvar
- integerOverflow
- invalidLifetime
- memleak
- negativeIndex
- uninitvar
2.
ctunullpointer
danglingTempReference
internalAstError
invalidFunctionArg
invalidFunctionArgBool
legacyUninitvar
nullPointer
preprocessorErrorDirective
returnDanglingLifetime
returnTempReference
uninitdata
uninitStructMember
va_end_missing
zerodiv
Steps To ReproduceN/A
TagsNo tags attached.
Test case number

Attached Files

  • 33024.xlsx (1,620,697 bytes)

Relationships

related to 0033048 closedaml Foundation Classes - math_ComputeKronrodPointsAndWeights indexation goes beyond the limit 
child of 0033024 assigneddpasukhi Coding - collect and fix CppCheck issues 

Activities

alukin

2022-06-27 20:16

developer   ~0109296

33024.xlsx (1,620,697 bytes)

git

2022-06-30 00:23

administrator   ~0109401

Branch CR33033 has been created by alukin.

SHA-1: a28be1eb2abe4fa7d71c4c3529e370ebc8a2b456


Detailed log of new commits:

Author: aln
Date: Thu Jun 30 00:22:19 2022 +0300

    Fixed errors

Author: aln
Date: Tue Jun 28 17:03:14 2022 +0300

    Fixed memleak and va_end_missing issues

alukin

2022-06-30 00:23

developer   ~0109402

ctunullpointer - ignored

ctuuninitvar
src\src\AdvApp2Var\AdvApp2Var_SysBase.cxx (915) - fixed

danglingTempReference - ignored

integerOverflow - no bugs

internalAstError - ignored

invalidFunctionArg - no bugs

invalidFunctionArgBool - no bugs

invalidLifetime - no bugs

legacyUninitvar
src\src\AdvApp2Var\AdvApp2Var_SysBase.cxx (2079) - fixed
src\src\BinMDataStd\BinMDataStd_IntPackedMapDriver.cxx (78) - fixed
src\src\BinMNaming\BinMNaming_NamedShapeDriver.cxx (127) - fixed
src\src\BinMNaming\BinMNaming_NamedShapeDriver.cxx (129) - fixed
src\src\IntTools\IntTools_FaceFace.cxx (2367) - fixed

memleak
src\src\GeomliteTest\GeomliteTest_SurfaceCommands.cxx (546) - fixed
src\src\NCollection\NCollection_Array1.hxx (164, 411) - no bugs

nullPointer - no bugs

preprocessorErrorDirective - ignored

returnDanglingLifetime
src\src\Standard\Standard_Dump.cxx (231, 243) - fixed

returnTempReference
src\src\Select3D\Select3D_SensitiveSet.hxx (199) - more research needed

uninitdata
src\src\math\math_ComputeKronrodPointsAndWeights.cxx (61, 62) - more research needed

uninitStructMember - no bugs

uninitvar
src\src\ApproxInt\ApproxInt_Approx.gxx (81, 82) - fixed
src\src\BinMDataStd\BinMDataStd_IntegerDriver.cxx (58) - fixed
src\src\BinMDataStd\BinMDataStd_RealDriver.cxx (58) - fixed
src\src\BinMDataXtd\BinMDataXtd_GeometryDriver.cxx (58) - fixed
src\src\BinMDataXtd\BinMDataXtd_PositionDriver.cxx (59) - fixed
src\src\BinMDataXtd\BinMDataXtd_PresentationDriver.cxx (60, 96) - fixed
src\src\BinMDF\BinMDF_TagSourceDriver.cxx (55) - fixed
src\src\BinMFunction\BinMFunction_FunctionDriver.cxx (66) - fixed
src\src\BinMNaming\BinMNaming_NamedShapeDriver.cxx (122, 127, 129, 180, 184) - fixed
src\src\BinMNaming\BinMNaming_NamingDriver.cxx (156, 203) - fixed
src\src\BinMXCAFDoc\BinMXCAFDoc_CentroidDriver.cxx (52) - fixed
src\src\BinMXCAFDoc\BinMXCAFDoc_ColorDriver.cxx (53) - fixed
src\src\BRepMesh\delabella.cpp (301) - more research needed
src\src\ChFi2d\ChFi2d_FilletAlgo.hxx (210) - fixed
src\src\ChFi3d\ChFi3d_Builder_C1.cxx (381) - fixed
src\src\ChFi3d\ChFi3d_ChBuilder.cxx (1854) - fixed
src\src\HLRAlgo\HLRAlgo_PolyInternalData.cxx (525) - fixed
src\src\IntPatch\IntPatch_LineConstructor.cxx (1009) - fixed
src\src\MeshVS\MeshVS_DataSource.cxx (322) - fixed
src\src\MeshVS\MeshVS_MeshPrsBuilder.cxx (112) - fixed
src\src\OSD\OSD_signal.cxx (298) - fixed

va_end_missing
src\src\Standard\Standard_Dump.cxx (163) - fixed

zerodiv - no bugs

kgv

2022-06-30 09:22

developer   ~0109404

-      if ( S.IsNull()) return 1;
+      if (S.IsNull())
+      {
+        delete[] name;

It is necessary to get rid from unsafe dynamic memory allocations in general-purpose code (using string/vector/array classes, where applicable).

Issue History

Date Modified Username Field Change
2022-06-27 14:36 alukin New Issue
2022-06-27 14:36 alukin Assigned To => aml
2022-06-27 14:37 alukin Relationship added parent of 0033024
2022-06-27 14:52 alukin Assigned To aml => alukin
2022-06-27 14:53 alukin Description Updated
2022-06-27 14:54 aml Summary 0033024: Coding - collect and fix CppCheck issues - errors - severity 0 => Coding - collect and fix CppCheck issues - errors - severity 0
2022-06-27 15:17 alukin Summary Coding - collect and fix CppCheck issues - errors - severity 0 => Coding - collect and fix CppCheck issues - errors
2022-06-27 15:17 alukin Description Updated
2022-06-27 15:31 alukin File Deleted: 33024.zip
2022-06-27 15:32 alukin Description Updated
2022-06-27 16:04 alukin Steps to Reproduce Updated
2022-06-27 16:06 alukin Description Updated
2022-06-27 16:20 alukin Description Updated
2022-06-27 16:20 alukin Description Updated
2022-06-27 16:47 alukin File Deleted: 33024.csv
2022-06-27 20:16 alukin Note Added: 0109296
2022-06-27 20:16 alukin File Added: 33024.xlsx
2022-06-27 20:43 alukin Description Updated
2022-06-28 08:59 azv Relationship deleted parent of 0033024
2022-06-28 08:59 azv Relationship added child of 0033024
2022-06-28 09:00 azv Project Community => Open CASCADE
2022-06-30 00:23 git Note Added: 0109401
2022-06-30 00:23 alukin Note Added: 0109402
2022-06-30 09:22 kgv Note Added: 0109404
2022-07-01 09:09 aml Relationship added related to 0033048
2022-08-17 12:01 kgv Target Version 7.7.0 => 7.8.0
2023-08-01 15:09 dpasukhi Target Version 7.8.0 => Unscheduled