Anonymous | Login | 2021-01-18 07:08 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0030201 | Community | [OCCT] OCCT:Modeling Algorithms | public | 2018-10-04 19:01 | 2020-09-15 16:22 | ||||||||
Reporter | galbramc | ||||||||||||
Assigned To | jgv | ||||||||||||
Priority | normal | Severity | crash | ||||||||||
Status | assigned | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | [OCCT] 7.3.0 | ||||||||||||
Target Version | [OCCT] 7.6.0* | Fixed in Version | |||||||||||
Summary | 0030201: ChFi3d_Builder::PerformMoreThreeCorner segfault by using nullptr | ||||||||||||
Description | BRep_Tool::CurveOnSurface on lines 2225 and 2235 can set curv2d1 or curv2d2 to null. These variables are then used without checking for the null value leading to a segfault. Throwing an exception in the following patch is a band aid that avoids the segfault, but does not resolve the desire for a fillet. Index: src/ChFi3d/ChFi3d_Builder_CnCrn.cxx =================================================================== --- src/ChFi3d/ChFi3d_Builder_CnCrn.cxx (revision 1) +++ src/ChFi3d/ChFi3d_Builder_CnCrn.cxx (working copy) @@ -2226,6 +2226,7 @@ u1bid,u2bid); else Calcul_C2dOnFace(CD.Value(ic),jf.Value(ic),i.Value(ic,icplus),curv2d1); + if(curv2d1.IsNull()) throw Standard_ConstructionError("PChFi3d_Builder::PerformMoreThreeCorner : curv2d1 is null"); p2d1 = curv2d1 ->Value(p.Value(ic,icplus)); // recuperation de la deuxieme courbe 2d @@ -2237,6 +2238,7 @@ jfp = 3 - jf.Value(icplus); Calcul_C2dOnFace(CD.Value(icplus),jfp,i.Value(icplus,ic),curv2d2); } + if(curv2d2.IsNull()) throw Standard_ConstructionError("PChFi3d_Builder::PerformMoreThreeCorner : curv2d2 is null"); p2d2 = curv2d2 ->Value(p.Value(icplus,ic)); Asurf = new GeomAdaptor_HSurface(BRep_Tool::Surface(TopoDS::Face(Fvive.Value(ic,icplus)))); | ||||||||||||
Steps To Reproduce | Run attached code with shape.brep. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Test case number | |||||||||||||
Attached Files | ![]() | ||||||||||||
![]() |
|
(0081867) galbramc (reporter) 2019-01-23 16:23 |
Any luck with getting this use of a null pointer resolved? |
![]() |
|||
Date Modified | Username | Field | Change |
2018-10-04 19:01 | galbramc | New Issue | |
2018-10-04 19:01 | galbramc | Assigned To | => msv |
2018-10-04 19:01 | galbramc | File Added: ChFi3d_nullptr.tgz | |
2018-10-12 20:41 | abv | Target Version | => 7.4.0 |
2018-10-15 10:15 | msv | Assigned To | msv => jgv |
2018-10-15 10:15 | msv | Status | new => assigned |
2019-01-23 16:23 | galbramc | Note Added: 0081867 | |
2019-08-12 17:59 | msv | Target Version | 7.4.0 => 7.5.0 |
2019-10-11 11:40 | abv | Relationship added | related to 0031023 |
2020-09-15 16:22 | msv | Target Version | 7.5.0 => 7.6.0* |
Copyright © 2000 - 2021 MantisBT Team |