Archived issue #0032041
Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
Description
Calling method ExchangeUV() in Geom_BezierSurface may lead to Access Violation.
Steps to reproduce
pload MODELING beziersurf bs 4 4 0 0 0 4 0 0 8 0 0 12 0 0 0 4 0 4 4 1 8 4 0 12 4 0 0 8 0 4 8 0 8 8 -1 12 8 0 0 12 0 4 12 0 8 12 0 12 12 0 exchuv bs
C++ Code to reproduce:
TColgp_Array2OfPnt anArr(1, 2, 1, 3); anArr.SetValue(1, 1, gp_Pnt(0, 0, 0)); anArr.SetValue(1, 2, gp_Pnt(0, 1, 0)); anArr.SetValue(1, 3, gp_Pnt(0, 2, 0)); anArr.SetValue(2, 1, gp_Pnt(1, 0, 0)); anArr.SetValue(2, 2, gp_Pnt(1, 1, 0)); anArr.SetValue(2, 3, gp_Pnt(1, 2, 0)); const Handle(Geom_BezierSurface) aBezierSurf = new Geom_BezierSurface(anArr); aBezierSurf->ExchangeUV();
Public activity
5 archived notes
Participants are labeled by their role within this record.
There are no check the member variable (address of weights) exist or not, Geom_BSplineSurface has this problem also.
Branch [archived branch] has been created by Commenter 4.
[revision removed]
Detailed log of new commits:
Author: Commenter 4
Date: Thu Jan 7 23:10:27 2021 +0300
0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().
[revision removed]
Detailed log of new commits:
Author: Commenter 4
Date: Thu Jan 7 23:10:27 2021 +0300
0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().
Patch is ready for review
- OCCT branch: [archived branch]
http://jenkins-test-12.nnov.opencascade.com/view/CR32041-master-KGV/
- OCCT branch: [archived branch]
http://jenkins-test-12.nnov.opencascade.com/view/CR32041-master-KGV/
For integration:
occt - CR32041
products - none
occt - CR32041
products - none
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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: 17754.160000000134 / 17720.07000000011 [+0.19%]
Products
Total CPU difference: 12412.630000000105 / 12419.360000000095 [-0.05%]
Windows-64-VC14:
OCCT
Total CPU difference: 19336.3125 / 19330.015625 [+0.03%]
Products
Total CPU difference: 13740.03125 / 13831.828125 [-0.66%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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: 17754.160000000134 / 17720.07000000011 [+0.19%]
Products
Total CPU difference: 12412.630000000105 / 12419.360000000095 [-0.05%]
Windows-64-VC14:
OCCT
Total CPU difference: 19336.3125 / 19330.015625 [+0.03%]
Products
Total CPU difference: 13740.03125 / 13831.828125 [-0.66%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention