MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030203Community[OCCT] OCCT:Modeling Algorithmspublic2018-10-05 02:222018-10-28 16:13
Reportergalbramc 
Assigned Toapn 
PrioritynormalSeveritycrash 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030203: ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d array out of bound
DescriptionOn line 1189 of src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx Param.Value is accessed as Param.Value(tPp+j) where j is initially 1. However, tPp is sometimes equal to the size of Param, hence an out of bounds access occurs. Setting j = 0 on line 1186 or moving up the check "if( (tPp+j) > NbOfPnts ) break;" will prevent this. The following patch simply avoids the array out of bounds:

Index: src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx
===================================================================
--- src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx (revision 1)
+++ src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx (working copy)
@@ -1183,7 +1183,7 @@
         if( tPp != 0 ) {
           gp_Pnt2d aPp = gp_Pnt2d(u,v);
           gp_Pnt2d aPn;
- j = 1;
+ j = 0;
           Standard_Boolean isFound = Standard_False;
           while( !isFound ) {
         Curve->D0( Param.Value(tPp+j), pntproj );
Steps To Reproducetest case
bugs modalg_7 bug30203

test uses files bug30203_curv.brep and bug30203_surf.brep (attached)
TagsNo tags attached.
Test case numberbugs modalg_7 bug30203
Attached Filestgz file icon ProjLib_OutOfBound.tgz (2,025 bytes) 2018-10-05 02:22
? file icon bug30203_curv.brep (421 bytes) 2018-10-19 15:57
? file icon bug30203_surf.brep (3,861 bytes) 2018-10-19 15:57

- Relationships

-  Notes
(0080023)
git (administrator)
2018-10-16 17:13

Branch CR30203 has been created by ifv.

SHA-1: c77cf5ff386e78d0470586ac6b9016e172f56596


Detailed log of new commits:

Author: ifv
Date: Tue Oct 16 17:10:44 2018 +0300

    0030203: ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d array out of bound
(0080125)
git (administrator)
2018-10-19 15:28

Branch CR30203 has been updated forcibly by ifv.

SHA-1: 3488862a1013382deb43203a310fedbc968710ea
(0080129)
git (administrator)
2018-10-19 15:55

Branch CR30203 has been updated forcibly by ifv.

SHA-1: 26269d1a174f0e6abba02a28d830d9dcf1346f55
(0080131)
ifv (developer)
2018-10-19 16:01

CR30203 is ready for review, test results exist
(0080221)
git (administrator)
2018-10-23 11:09

Branch CR30203 has been updated forcibly by msv.

SHA-1: bbb826366fef8c960778e90cd2f335e779bb9714
(0080223)
msv (developer)
2018-10-23 11:21

Reviewed.
(0080235)
apn (administrator)
2018-10-23 16:09

Combination -
OCCT branch : CR30203 SHA - bbb826366fef8c960778e90cd2f335e779bb9714
Products branch : master SHA - 35af85def09c66ceeaf90b4e4fb8b54e68d5e98c
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

Test case:
bugs modalg_7 bug30203 - OK

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17650.049999999817 / 17520.90999999988 [+0.74%]
Products
Total CPU difference: 7401.310000000056 / 7462.09000000004 [-0.81%]
Windows-64-VC14:
OCCT
Total CPU difference: 17595.96119389854 / 17666.582846598394 [-0.40%]
Products
Total CPU difference: 8375.615689499997 / 8372.402068899986 [+0.04%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0080414)
git (administrator)
2018-10-28 16:13

Branch CR30203 has been deleted by inv.

SHA-1: bbb826366fef8c960778e90cd2f335e779bb9714

- Related Changesets
occt: master e5826d91
Timestamp: 2018-10-16 14:10:44
Author: ifv
Committer: apn
Details ] Diff ]
0030203: ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d array out of bound

Bug fixing: avoiding calculation if tPp == NbOfPnts
mod - src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx Diff ] File ]
add - tests/bugs/modalg_7/bug30203 Diff ] File ]

- Issue History
Date Modified Username Field Change
2018-10-05 02:22 galbramc New Issue
2018-10-05 02:22 galbramc Assigned To => msv
2018-10-05 02:22 galbramc File Added: ProjLib_OutOfBound.tgz
2018-10-05 09:32 msv Assigned To msv => ifv
2018-10-05 09:32 msv Status new => assigned
2018-10-05 09:32 msv Target Version => 7.4.0*
2018-10-16 17:13 git Note Added: 0080023
2018-10-19 15:28 git Note Added: 0080125
2018-10-19 15:55 git Note Added: 0080129
2018-10-19 15:57 ifv File Added: bug30203_curv.brep
2018-10-19 15:57 ifv File Added: bug30203_surf.brep
2018-10-19 15:59 ifv Steps to Reproduce Updated View Revisions
2018-10-19 16:01 ifv Note Added: 0080131
2018-10-19 16:01 ifv Assigned To ifv => msv
2018-10-19 16:01 ifv Status assigned => resolved
2018-10-19 16:01 ifv Steps to Reproduce Updated View Revisions
2018-10-23 11:09 git Note Added: 0080221
2018-10-23 11:21 msv Note Added: 0080223
2018-10-23 11:21 msv Assigned To msv => bugmaster
2018-10-23 11:21 msv Status resolved => reviewed
2018-10-23 16:09 apn Test case number => bugs modalg_7 bug30203
2018-10-23 16:09 apn Note Added: 0080235
2018-10-23 16:09 apn Status reviewed => tested
2018-10-28 13:20 apn Changeset attached => occt master e5826d91
2018-10-28 13:20 apn Assigned To bugmaster => apn
2018-10-28 13:20 apn Status tested => verified
2018-10-28 13:20 apn Resolution open => fixed
2018-10-28 16:13 git Note Added: 0080414


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker