View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025074 | Community | OCCT:Coding | public | 2014-07-12 02:32 | 2014-11-11 12:53 |
Reporter | Epy | Assigned To | bugmaster | ||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
Platform | MinGW/g++ 4.8.1 | OS | Windows 64-bit | ||
Product Version | 6.7.1 | ||||
Target Version | 6.8.0 | Fixed in Version | 6.8.0 | ||
Summary | 0025074: Intf_Polygon2d - add virtual destructor | ||||
Description | I received the following warnings when compiling:In file included from /src/IntCurve/IntCurve_IntPolyPolyGen.gxx:47:0, from \drv\Geom2dInt\Geom2dInt_TheIntPCurvePCurveOfGInter_0.cxx:45: /src/NCollection/NCollection_Handle.hxx: In instantiation of 'NCollection_Handle<T>::Ptr::~Ptr() [with T = Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter]': /src/IntCurve/IntCurve_IntPolyPolyGen.gxx:1032:1: required from here /src/NCollection/NCollection_Handle.hxx:62:28: warning: deleting object of polymorphic class type 'Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] ~Ptr () { if ( myPtr ) delete myPtr; myPtr = 0; } ^ In file included from /src/IntCurve/IntCurve_IntPolyPolyGen.gxx:47:0, from \drv\HLRBRep\HLRBRep_TheIntPCurvePCurveOfCInter_0.cxx:42: /src/NCollection/NCollection_Handle.hxx: In instantiation of 'NCollection_Handle<T>::Ptr::~Ptr() [with T = HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter]': /src/IntCurve/IntCurve_IntPolyPolyGen.gxx:1032:1: required from here /src/NCollection/NCollection_Handle.hxx:62:28: warning: deleting object of polymorphic class type 'HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] ~Ptr () { if ( myPtr ) delete myPtr; myPtr = 0; } ^ My C++ OOP knowledge is minimal, so I will leave it up to OCCT devs to determine whether this is meaningful or not. | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Patch is ready for review in branch CR25074. |
|
Hi, related to the original posted problem: /home/jake/oce/src/Voxel/Voxel_CollisionDetection.cxx: In member function âvoid Voxel_CollisionDetection::Clear()â: /home/jake/oce/src/Voxel/Voxel_CollisionDetection.cxx:274:36: warning: deleting object of polymorphic class type âVoxel_BoolDSâ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] delete ((Voxel_BoolDS*)myVoxels); ^ |
|
Please test the patch. |
|
Dear BugMaster, Branch CR25074 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested. SHA-1: 4151a7173d21d695af9b576b7532413d6baf517b Number of compiler warnings: occt component : Linux: 15 (15 on master) Windows: 0 (0 on master) MacOS: 197 (199 on master) products component : Linux: 11 (11 on master) Windows: 2 (2 on master) Regressions/Differences: No regressions/differences Testing cases: Not needed Testing on Linux: Total MEMORY difference: 352228684 / 352287924 Total CPU difference: 60689.039999999935 / 54524.449999999866 Testing on Windows: Total MEMORY difference: 377724552 / 378502168 Total CPU difference: 37160.359375 / 46775.625 There are no differences in images found by testdiff. |
|
Branch CR25074 has been deleted by inv. SHA-1: 4151a7173d21d695af9b576b7532413d6baf517b |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-07-12 02:32 | Epy | New Issue | |
2014-07-12 02:32 | Epy | Assigned To | => kgv |
2014-07-12 13:30 | kgv | Severity | minor => trivial |
2014-07-12 13:30 | kgv | Status | new => assigned |
2014-07-12 13:30 | kgv | Target Version | => 6.8.0 |
2014-07-12 13:30 | kgv | Summary | deleting object of polymorphic class with non-virtual destructor might cause undefined behaviour => Intf_Polygon2d - add virtual destructor |
2014-07-12 13:30 | kgv | Description Updated | |
2014-07-12 13:32 | kgv | Note Added: 0030097 | |
2014-07-12 13:32 | kgv | Assigned To | kgv => abv |
2014-07-12 13:32 | kgv | Status | assigned => resolved |
2014-07-13 23:42 | Epy | Note Added: 0030101 | |
2014-07-14 14:56 | kgv | Note Added: 0030125 | |
2014-07-14 14:56 | kgv | Assigned To | abv => bugmaster |
2014-07-14 14:56 | kgv | Status | resolved => reviewed |
2014-07-15 19:17 |
|
Assigned To | bugmaster => mkv |
2014-07-17 13:50 |
|
Note Added: 0030228 | |
2014-07-17 13:50 |
|
Test case number | => Not needed |
2014-07-17 13:50 |
|
Assigned To | mkv => bugmaster |
2014-07-17 13:50 |
|
Status | reviewed => tested |
2014-07-22 15:13 | bugmaster | Changeset attached | => occt master ac83e94f |
2014-07-22 15:13 | bugmaster | Status | tested => verified |
2014-07-22 15:13 | bugmaster | Resolution | open => fixed |
2014-07-22 16:02 | git | Note Added: 0030321 | |
2014-11-11 12:46 |
|
Fixed in Version | => 6.8.0 |
2014-11-11 12:53 |
|
Status | verified => closed |