MantisBT - Community
View Issue Details
0030140Community[OCCT] OCCT:Modeling Algorithmspublic2018-09-17 11:092019-06-24 09:07
hwliu11 
bugmaster 
normalcrash 
verifiedfixed 
Intel X86Windows10
[OCCT] 7.3.0 
[OCCT] 7.4.0 
bugs/modalg_7/bug30140
0030140: Modeling Algorithms - Access Null Pointer within FindPlane() defined in GeomFill_CorrectedFrenet.cxx
In TKGeomAlgo/GeomFill/GeomFill_CorrectedFrenet.cxx,in Function FindPlane at line 267 to 278,the Value TabP not Allocate,so crash
  default:
    { // On utilise un echantillonage
      Standard_Integer nbp = 15 + theC->NbIntervals(GeomAbs_C3);
      Standard_Real f, l, t, inv;
      Standard_Integer ii;
      f = theC->FirstParameter();
      l = theC->LastParameter();
      inv = 1./(nbp-1);
      for (ii=1; ii<=nbp; ii++) {
    t = ( f*(nbp-ii) + l*(ii-1));
    t *= inv;
    TabP->SetValue(ii, theC->Value(t));
      }
    }
  }
so miss code like this TabP = new (TColgp_HArray1OfPnt) (1, nbp)?
line l_path 0 0 0 1 0 0
trim l_path l_path 0 10
mkedge path l_path
wire path path

circle c_profile 0 0 2 1 0 0 5
mkedge profile c_profile
wire profile profile

pipe result path profile 0
# pipe on linear path is OK

point dir 0 1 0
offsetcurve offset_path l_path 2 dir
mkedge path offset_path
wire path path

pipe result path profile 0
# pipe on offset path raises exception
An exception was caught 0000027089E266F0 : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at address 0x0000000000000020 during 'READ' operation
** Exception ** 0000027089E266F0 : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at address 0x0000000000000020 during 'READ' operation
No tags attached.
has duplicate 0030771closed bugmaster FindPlane in GeomFill_CorrectedFrenet dereferences a null pointer 
Issue History
2018-09-17 11:09hwliu11New Issue
2018-09-17 11:09hwliu11Assigned To => msv
2018-09-17 21:18msvAssigned Tomsv => nbv
2018-09-17 21:18msvStatusnew => assigned
2018-09-17 21:18msvTarget Version => 7.4.0
2018-09-17 21:19msvNote Added: 0079226
2018-09-18 10:21emvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19931#r19931
2018-09-18 10:43nbvSummaryAccess Null Pointer => Modeling Algorithms - Access Null Pointer
2018-09-18 11:10gitNote Added: 0079233
2018-09-18 12:54nbvNote Added: 0079234
2018-09-18 12:54nbvAssigned Tonbv => emv
2018-09-18 12:54nbvStatusassigned => resolved
2018-09-18 13:00emvNote Added: 0079235
2018-09-18 13:00emvAssigned Toemv => bugmaster
2018-09-18 13:00emvStatusresolved => reviewed
2018-09-18 19:26bugmasterTest case number => bugs/modalg_7/bug30140
2018-09-18 19:28bugmasterNote Added: 0079249
2018-09-18 19:28bugmasterStatusreviewed => tested
2018-09-19 10:01gitNote Added: 0079255
2018-09-20 18:31kgvSummaryModeling Algorithms - Access Null Pointer => Modeling Algorithms - Access Null Pointer within FindPlane() defined in GeomFill_CorrectedFrenet.cxx
2018-09-30 18:26bugmasterChangeset attached => occt master 7e425ba7
2018-09-30 18:26bugmasterStatustested => verified
2018-09-30 18:26bugmasterResolutionopen => fixed
2018-09-30 18:47gitNote Added: 0079517
2019-06-24 09:07kgvRelationship addedhas duplicate 0030771

Notes
(0079226)
msv   
2018-09-17 21:19   
It is obvious that allocation is missing here.
(0079233)
git   
2018-09-18 11:10   
Branch CR30140 has been created by nbv.

SHA-1: 0fdd769a83e4dfdcb41949684822d90dd1dbbab7


Detailed log of new commits:

Author: nbv
Date: Tue Sep 18 11:10:19 2018 +0300

    0030140: Modeling Algorithms - Access Null Pointer
    
    The array TabP has been allocated correctly.
(0079234)
nbv   
2018-09-18 12:54   
Dear Eugeny,

Please review the branch CR30140.

Test results are here: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30140-master_NBV/ [^]
(0079235)
emv   
2018-09-18 13:00   
Reviewed.
(0079249)
bugmaster   
2018-09-18 19:28   
Combination -
OCCT branch : CR30140 SHA - 0fdd769a83e4dfdcb41949684822d90dd1dbbab7
Products branch : master SHA - f9065a267b8d853b9b62de5a81af9e9e51bc8d26
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: 17736.509999999784 / 17379.439999999933 [+2.05%]
Products
Total CPU difference: 7481.980000000051 / 7467.690000000077 [+0.19%]
Windows-64-VC14:
OCCT
Total CPU difference: 17561.42257249863 / 17536.33761169853 [+0.14%]
Products
Total CPU difference: 8368.408443299986 / 8382.276932199968 [-0.17%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0079255)
git   
2018-09-19 10:01   
Branch CR30140 has been updated by nbv.

SHA-1: 8fde0677ae2d4e516b78cfea17314f6ddaa9f8d4


Detailed log of new commits:

Author: nbv
Date: Wed Sep 19 10:00:47 2018 +0300

    # Small correction in the test case

(0079517)
git   
2018-09-30 18:47   
Branch CR30140 has been deleted by inv.

SHA-1: 8fde0677ae2d4e516b78cfea17314f6ddaa9f8d4