MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031585Community[OCCT] OCCT:Modeling Algorithmspublic2020-05-30 16:552020-05-30 16:55
Reporterabdullah 
Assigned Tomsv 
PrioritynormalSeveritycrash 
StatusnewResolutionopen 
PlatformLinuxOSDebian 6.0OS Version64 bit
Product Version[OCCT] 7.3.0 
Target VersionFixed in Version 
Summary0031585: Access Violation while creating fillet - ChFi3d_Builder::PerformIntersectionAtEnd
Description
This bug is reported against, git commit ae58f70718a089f84178d45a1bf9bee586d52d80 (master branch on 30 may 2020, OCC_VERSION 7.4.1). It is also present in 7.3.0.

I attach a patch as a possible solution.

In:

void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)

TopoDS_Edge Edge[nn];

is defined with:

const Standard_Integer nn=15;

At line 2020, in the loop "while (!trouve)"

there is no check of the index nb used for array "Edge", in the example described below, nb takes value 15 => Edge[15] which causes an Access Violation.

I have not investigated the actual reason why it is not found.

The possible solution I propose is to check the index and throw an exception to avoid the crash.
Steps To Reproduce
This access violation was reported in the FreeCAD project:
https://tracker.freecadweb.org/view.php?id=4129 [^]
https://forum.freecadweb.org/viewtopic.php?f=3&t=38590 [^]

Creating a draw.exe example of this is not straight-forward. In my system I build Opencascade from master in Debug mode and debug a locally build debug version of FreeCAD using it.

As it involves an access violation, I think you will be interested in this report and possible solution, even though I do not actually provide a draw example.

If you need further information or want to provide me with an alternative solution so that I check, I am happy to contribute.
Additional information
and documentation updates
diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx
index 369d4dcd7a..339b662691 100644
--- a/src/ChFi3d/ChFi3d_Builder_C1.cxx
+++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx
@@ -2020,0 +2021 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
+ if (nb>=nn) throw Standard_Failure("IntersectionAtEnd : the max number of edges reached");
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2020-05-30 16:55 abdullah New Issue
2020-05-30 16:55 abdullah Assigned To => msv


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker