MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025314Open CASCADE[OCCT] OCCT:Codingpublic2014-10-01 19:462014-11-11 13:01
Reporterabv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.8.0 
Summary0025314: Usage of smart pointers for dynamically allocated memory in BVH
DescriptionAlgorithms implemented in BVH package use simple C pointers allocated with operator new and released with explicit delete. This practice is unsafe and can lead to memory leaks if delete is forgotten (see example of this problem fixed in BVH_SweepPlaneBuilder::BuildNode() in branch CR25159_1, commit 76037d9).

Instead, classes providing automatic memory release (smart pointers, e.g. std::auto_ptr<>, or arrays, e.g. NCollection_Array1<>) should be used.
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0025159closedbugmaster Collections and common types in BVH package are named in non-conformant manner 

-  Notes
(0032541)
abv (manager)
2014-10-01 20:08
edited on: 2014-10-01 20:10

The same problem (memory leak) seems to be present in BVH_LinearBuilder.lxx, see aLinkMap. Tricks with *new() in the code using TBB in the same file also look suspicious, please check and add appropriate explanatory comment in the code if this is specific to TBB way of life.

Note that work with TBB will need to be revised in context of 0024826.

(0032918)
git (administrator)
2014-10-09 17:18

Branch CR25314 has been created by dbp.

SHA-1: 30fd13756b18f00bc1c855ce936f04450e101328


Detailed log of new commits:

Author: dbp
Date: Thu Oct 9 17:17:57 2014 +0400

    0025314: Usage of smart pointers for dynamically allocated memory in BVH
(0032923)
git (administrator)
2014-10-09 17:59

Branch CR25314_1 has been created by dbp.

SHA-1: af320d54a90314734f96e9a9b7f2e387cb23131c


Detailed log of new commits:

Author: dbp
Date: Thu Oct 9 17:59:01 2014 +0400

    0025314: Usage of smart pointers for dynamically allocated memory in BVH
(0032924)
dbp (developer)
2014-10-09 18:00

Dear abv,

please review the patch in branch CR25314_1.
(0032942)
git (administrator)
2014-10-09 18:40

Branch CR25314_1 has been deleted by dbp.

SHA-1: af320d54a90314734f96e9a9b7f2e387cb23131c
(0032944)
git (administrator)
2014-10-09 18:40

Branch CR25314_1 has been created by dbp.

SHA-1: 420091f4b0d4959033bfd9aa754e5992927f7abb


Detailed log of new commits:

Author: dbp
Date: Thu Oct 9 18:40:20 2014 +0400

    025314: Usage of smart pointers for dynamically allocated memory in BVH
(0032950)
abv (manager)
2014-10-10 05:58

No remarks, please check compilation and integrate. Note that testing is not required since changes are in classes not yet used in other parts of OCCT.
(0033410)
git (administrator)
2014-10-21 16:40

Branch CR25314_1 has been deleted by inv.

SHA-1: 420091f4b0d4959033bfd9aa754e5992927f7abb
(0033412)
git (administrator)
2014-10-21 16:40

Branch CR25314 has been deleted by inv.

SHA-1: 30fd13756b18f00bc1c855ce936f04450e101328

- Related Changesets
occt: master e3709f1d
Timestamp: 2014-10-10 12:14:53
Author: dbp
Committer: bugmaster
Details ] Diff ]
025314: Usage of smart pointers for dynamically allocated memory in BVH
mod - src/BVH/BVH_LinearBuilder.lxx Diff ] File ]
mod - src/BVH/BVH_SweepPlaneBuilder.lxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2014-10-01 19:46 abv New Issue
2014-10-01 19:46 abv Assigned To => kgv
2014-10-01 19:47 abv Relationship added related to 0025159
2014-10-01 20:08 abv Note Added: 0032541
2014-10-01 20:10 abv Note Edited: 0032541 View Revisions
2014-10-06 13:12 kgv Assigned To kgv => dbp
2014-10-06 13:12 kgv Status new => assigned
2014-10-09 17:18 git Note Added: 0032918
2014-10-09 17:59 git Note Added: 0032923
2014-10-09 18:00 dbp Note Added: 0032924
2014-10-09 18:00 dbp Assigned To dbp => abv
2014-10-09 18:00 dbp Status assigned => resolved
2014-10-09 18:40 git Note Added: 0032942
2014-10-09 18:40 git Note Added: 0032944
2014-10-10 05:58 abv Note Added: 0032950
2014-10-10 05:58 abv Assigned To abv => bugmaster
2014-10-10 05:58 abv Status resolved => reviewed
2014-10-13 17:52 bugmaster Changeset attached => occt master e3709f1d
2014-10-13 17:52 bugmaster Status reviewed => verified
2014-10-13 17:52 bugmaster Resolution open => fixed
2014-10-21 16:40 git Note Added: 0033410
2014-10-21 16:40 git Note Added: 0033412
2014-11-11 12:43 aiv Fixed in Version => 6.8.0
2014-11-11 13:01 aiv Status verified => closed


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker