View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030565 | Community | OCCT:Coding | public | 2019-03-13 04:44 | 2019-03-26 11:13 |
Reporter | galbramc | Assigned To | bugmaster | ||
Priority | normal | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.3.0 | ||||
Target Version | 7.4.0 | Fixed in Version | 7.4.0 | ||
Summary | 0030565: Coding - Approx_SweepApproximation call on null pointer | ||||
Description | I compiled OCCT with the -fsanitize=undefined flag and got the following errors: src/Approx/Approx_SweepApproximation.cxx:179:31: runtime error: member call on null pointer of type 'struct TColgp_HArray1OfVec2d' src/Approx/Approx_SweepApproximation.cxx:179:31: runtime error: member access within null pointer of type 'struct TColgp_HArray1OfVec2d' This is a problem when Num2DSS==0 the arrays: if (Num2DSS>0) { myPoles2d = new (TColgp_HArray1OfPnt2d)(1, Num2DSS); myDPoles2d = new (TColgp_HArray1OfVec2d)(1, Num2DSS); myD2Poles2d = new (TColgp_HArray1OfVec2d)(1, Num2DSS); COnSurfErr = new (TColStd_HArray1OfReal)(1, Num2DSS); } which are then used on line 179. This fix avoids the null pointer: myPoles2d = new (TColgp_HArray1OfPnt2d)(1, std::max(Num2DSS,1)); myDPoles2d = new (TColgp_HArray1OfVec2d)(1, std::max(Num2DSS,1)); myD2Poles2d = new (TColgp_HArray1OfVec2d)(1, std::max(Num2DSS,1)); COnSurfErr = new (TColStd_HArray1OfReal)(1, std::max(Num2DSS,1)); but may not be the right solution. | ||||
Steps To Reproduce | Compile OCCT with a g++ newer than 4.9 with the -fsanitize=undefined compiler flag and run the test suite. | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Should be fixed by 0030582. Please check, if possible. |
|
This will be tricky for me to check as there are a large number of changes. I could try to put together an example for you if you would like? |
|
As best as I can tell it looks like the fix in 0030582 should resolve this problem. |
|
Dear bugmaster, please switch this bug to VERIFIED (fixed in scope of 0030582). |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-03-13 04:44 | galbramc | New Issue | |
2019-03-13 04:44 | galbramc | Assigned To | => kgv |
2019-03-13 07:43 | kgv | Relationship added | child of 0030557 |
2019-03-25 14:21 | kgv | Relationship added | related to 0030582 |
2019-03-25 14:22 | kgv | Note Added: 0083224 | |
2019-03-25 14:22 | kgv | Assigned To | kgv => galbramc |
2019-03-25 14:22 | kgv | Status | new => feedback |
2019-03-25 14:22 | kgv | Target Version | => 7.4.0 |
2019-03-25 20:23 | galbramc | Note Added: 0083226 | |
2019-03-26 05:06 | galbramc | Note Added: 0083227 | |
2019-03-26 08:35 | kgv | Note Added: 0083228 | |
2019-03-26 08:35 | kgv | Assigned To | galbramc => bugmaster |
2019-03-26 11:13 | apn | Test case number | => Not needed |
2019-03-26 11:13 | apn | Status | feedback => verified |
2019-03-26 11:13 | apn | Resolution | open => fixed |