View Issue Details

IDProjectCategoryView StatusLast Update
0030582Open CASCADEOCCT:Codingpublic2019-04-08 12:18
Reporterkgv Assigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.3.0 
Target Version7.4.0Fixed in Version7.4.0 
Summary0030582: Coding - avoid defining references to properties of NULL objects
DescriptionAlthough such references might be not actually accessed by checking other variables, it doesn't look fine passing to functions invalid references.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0026042 closedbugmaster Community OCCT won't work with the latest Xcode 
related to 0030565 closedbugmaster Community Coding - Approx_SweepApproximation call on null pointer 

Activities

git

2019-03-16 10:39

administrator   ~0083010

Branch CR30582 has been created by kgv.

SHA-1: 562cd1331f08416d9a5ddb4a4f12f4451ef65218


Detailed log of new commits:

Author: kgv
Date: Fri Mar 15 18:06:04 2019 +0300

    0030582: Coding - avoid defining references to properties of NULL objects
    
    Approx_SweepApproximation::Perform() now creates empty arrays.
    GeomAdaptor_SurfaceOfRevolution::UTrim() - fixed No_Exception misuse.
    Poly_Triangulation::UVNodes() has been extended with NULL check.

kgv

2019-03-16 10:40

developer   ~0083011

Patch is ready for review.

git

2019-03-16 15:19

administrator   ~0083017

Branch CR30582 has been updated by kgv.

SHA-1: d8cace4b03fbd11e338e390924b84ce45570477f


Detailed log of new commits:

Author: kgv
Date: Sat Mar 16 15:12:51 2019 +0300

    # 0030582 BSplCLib::MovePoint()
    
    BSplCLib::MovePoint() and BSplCLib::MovePointAndTangent() now take optional
    weights parameter as pointer consistent to other methods like BSplCLib::BuildEval().

git

2019-03-18 22:12

administrator   ~0083061

Branch CR30582_1 has been created by kgv.

SHA-1: 576ba89c89dd8068aa9721abf316ccc204a9d89d


Detailed log of new commits:

Author: kgv
Date: Fri Mar 15 18:06:04 2019 +0300

    0030582: Coding - avoid defining references to properties of NULL objects
    
    Approx_SweepApproximation::Perform() now creates empty arrays.
    GeomAdaptor_SurfaceOfRevolution::UTrim() - fixed No_Exception misuse.
    Poly_Triangulation::UVNodes() has been extended with NULL check.
    
    BSplCLib::MovePoint() and BSplCLib::MovePointAndTangent() now take optional
    weights parameter as pointer consistent to other methods like BSplCLib::BuildEval().

msv

2019-03-20 18:39

developer   ~0083153

Last edited: 2019-03-20 18:39

src/BSplCLib/BSplCLib.hxx
- Descriptions of methods mentions parameter Rational that is removed. Please update descriptions.

src/Geom2d/Geom2d_BSplineCurve_1.cxx
- Please everywhere in your changes, eliminate tab characters to avoid defect of indentation when tab size setting is equal to 8.

src/Poly/Poly_Triangulation.hxx
- What is the reason to return empty static array in UVNodes() method if HasUVNodes() method can be used to check this condition?

Please perform testing of the patch.

git

2019-03-20 22:02

administrator   ~0083158

Branch CR30582_1 has been updated by kgv.

SHA-1: 8fce7cbab9ed37d2b40b0e8d8da68217042689d0


Detailed log of new commits:

Author: kgv
Date: Wed Mar 20 21:57:00 2019 +0300

    # remarks

git

2019-03-20 22:13

administrator   ~0083159

Branch CR30582_2 has been created by kgv.

SHA-1: 8c36d8b8d5f9540cb801a518287e8091dde4c965


Detailed log of new commits:

Author: kgv
Date: Fri Mar 15 18:06:04 2019 +0300

    0030582: Coding - avoid defining references to properties of NULL objects
    
    Approx_SweepApproximation::Perform() now creates empty arrays.
    GeomAdaptor_SurfaceOfRevolution::UTrim() - fixed No_Exception misuse.
    StdPrs_ShadedShape - fixed defining an invalid reference to Poly_Triangulation::UVNodes().
    
    BSplCLib::MovePoint() and BSplCLib::MovePointAndTangent() now take optional
    weights parameter as pointer consistent to other methods like BSplCLib::BuildEval().

git

2019-03-20 22:36

administrator   ~0083161

Branch CR30582_2 has been updated forcibly by kgv.

SHA-1: a9d640a48261bfc54f349d1201c62faf9c9a6cf0

kgv

2019-03-21 07:03

developer   ~0083163

Remarks have been applied:

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30582_2-master-KGV/

msv

2019-03-21 09:28

developer   ~0083171

Remark about tabs in Geom2d_BSplineCurve_1.cxx has not been considered.

git

2019-03-21 09:42

administrator   ~0083172

Branch CR30582_2 has been updated forcibly by kgv.

SHA-1: f268c991bf0fa853aa7c685b1b6cb6ec57bd690e

git

2019-03-21 09:44

administrator   ~0083173

Branch CR30582_2 has been updated forcibly by kgv.

SHA-1: 5fc689e0c8fae588df6d71eb6f9fc3dedf678189

kgv

2019-03-21 10:40

developer   ~0083177

Tabs removed from Geom2d_BSplineCurve_1.cxx (in addition to Geom_BSplineCurve_1.cxx)

msv

2019-03-21 10:50

developer   ~0083178

Reviewed.

apn

2019-03-21 13:03

administrator   ~0083184

Combination -
OCCT branch : CR30582_2
master SHA - f268c991bf0fa853aa7c685b1b6cb6ec57bd690e
d67d4b811012eef8913d3c535c29654d0acf3c4c
Products branch : master SHA - b3958866f73826c2eaaa9470209980d22e210fba
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16618.880000000074 / 16593.449999999997 [+0.15%]
Products
Total CPU difference: 9114.300000000032 / 9102.210000000046 [+0.13%]
Windows-64-VC14:
OCCT
Total CPU difference: 18083.15625 / 17984.46875 [+0.55%]
Products
Total CPU difference: 10560.984375 / 10609.28125 [-0.46%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2019-04-08 12:18

administrator   ~0083489

Branch CR30582_2 has been deleted by inv.

SHA-1: 5fc689e0c8fae588df6d71eb6f9fc3dedf678189

git

2019-04-08 12:18

administrator   ~0083492

Branch CR30582_1 has been deleted by inv.

SHA-1: 8fce7cbab9ed37d2b40b0e8d8da68217042689d0

git

2019-04-08 12:18

administrator   ~0083502

Branch CR30582 has been deleted by inv.

SHA-1: d8cace4b03fbd11e338e390924b84ce45570477f

Related Changesets

occt: master aff73fd5

2019-03-15 15:06:04

kgv


Committer: apn Details Diff
0030582: Coding - avoid defining references to properties of NULL objects

Approx_SweepApproximation::Perform() now creates empty arrays.
GeomAdaptor_SurfaceOfRevolution::UTrim() - fixed No_Exception misuse.
StdPrs_ShadedShape - fixed defining an invalid reference to Poly_Triangulation::UVNodes().

BSplCLib::MovePoint() and BSplCLib::MovePointAndTangent() now take optional
weights parameter as pointer consistent to other methods like BSplCLib::BuildEval().
Affected Issues
0030582
mod - src/Approx/Approx_SweepApproximation.cxx Diff File
mod - src/BSplCLib/BSplCLib.hxx Diff File
mod - src/BSplCLib/BSplCLib_2.cxx Diff File
mod - src/BSplCLib/BSplCLib_CurveComputation.gxx Diff File
mod - src/Geom/Geom_BSplineCurve.cxx Diff File
mod - src/Geom/Geom_BSplineCurve_1.cxx Diff File
mod - src/Geom2d/Geom2d_BSplineCurve.cxx Diff File
mod - src/Geom2d/Geom2d_BSplineCurve_1.cxx Diff File
mod - src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx Diff File
mod - src/Law/Law_BSpline.cxx Diff File
mod - src/NCollection/NCollection_DefineHArray1.hxx Diff File
mod - src/StdPrs/StdPrs_ShadedShape.cxx Diff File

Issue History

Date Modified Username Field Change
2019-03-16 10:32 kgv New Issue
2019-03-16 10:32 kgv Assigned To => kgv
2019-03-16 10:39 git Note Added: 0083010
2019-03-16 10:40 kgv Note Added: 0083011
2019-03-16 10:40 kgv Assigned To kgv => abv
2019-03-16 10:40 kgv Status new => resolved
2019-03-16 15:19 git Note Added: 0083017
2019-03-16 17:52 kgv Relationship added related to 0026042
2019-03-18 22:12 git Note Added: 0083061
2019-03-18 22:12 kgv Assigned To abv => msv
2019-03-20 18:39 msv Note Added: 0083153
2019-03-20 18:39 msv Assigned To msv => kgv
2019-03-20 18:39 msv Status resolved => assigned
2019-03-20 18:39 msv Note Edited: 0083153
2019-03-20 22:02 git Note Added: 0083158
2019-03-20 22:13 git Note Added: 0083159
2019-03-20 22:36 git Note Added: 0083161
2019-03-21 07:03 kgv Note Added: 0083163
2019-03-21 07:03 kgv Assigned To kgv => msv
2019-03-21 07:03 kgv Status assigned => resolved
2019-03-21 09:28 msv Note Added: 0083171
2019-03-21 09:29 msv Assigned To msv => kgv
2019-03-21 09:29 msv Status resolved => assigned
2019-03-21 09:42 git Note Added: 0083172
2019-03-21 09:44 git Note Added: 0083173
2019-03-21 10:40 kgv Note Added: 0083177
2019-03-21 10:40 kgv Assigned To kgv => msv
2019-03-21 10:40 kgv Status assigned => resolved
2019-03-21 10:50 msv Note Added: 0083178
2019-03-21 10:50 msv Assigned To msv => bugmaster
2019-03-21 10:50 msv Status resolved => reviewed
2019-03-21 13:03 apn Test case number => Not needed
2019-03-21 13:03 apn Note Added: 0083184
2019-03-21 13:03 apn Status reviewed => tested
2019-03-24 18:54 apn Changeset attached => occt master aff73fd5
2019-03-24 18:54 apn Assigned To bugmaster => apn
2019-03-24 18:54 apn Status tested => verified
2019-03-24 18:54 apn Resolution open => fixed
2019-03-25 14:21 kgv Relationship added related to 0030565
2019-04-08 12:18 git Note Added: 0083489
2019-04-08 12:18 git Note Added: 0083492
2019-04-08 12:18 git Note Added: 0083502