View Issue Details

IDProjectCategoryView StatusLast Update
0023392CommunityOCCT:Application Frameworkpublic2012-11-16 13:17
ReporterRoman Lygin Assigned ToRoman Lygin  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.5.3 
Target Version6.5.4Fixed in Version6.5.4 
Summary0023392: Memory leak in OCAF in debug mode
DescriptionTDF_LabelNode::Destroy() do not free memory for entry strings TCollection_AsciiString myDebugEntry;

Reproducer and memory allocation logs before and after the fix are attached.
Steps To ReproduceSee Reproducer() in ocaf-leak.zip.
TagsNo tags attached.
Test case number

Attached Files

  • ocaf-leak.zip (1,044 bytes)

Relationships

related to 0023393 closedRoman Lygin Improve usability of OSD_MAllocHook::CollectBySize 

Activities

Roman Lygin

2012-08-19 09:35

developer  

ocaf-leak.zip (1,044 bytes)

Roman Lygin

2012-08-19 09:51

developer   ~0021280

Fix pushed into the repository

Roman Lygin

2012-08-19 09:56

developer   ~0021281

Extra note: apparently this issue is a regression of 6.5.3 vs 6.5.2 as in 6.5.2 the destructor TDF_LabelNode::~TDF_LabelNode() was explicit and hence destroyed myDebugEntry.

abv

2012-08-19 10:21

manager   ~0021282

No remarks, please test

Roman Lygin

2012-08-19 11:04

developer   ~0021284

Upon integration of 0023393 the regression test can be reworked to programmatically check for a leak as follows:

if (OSD_MAllocHook::GetCollectBySize()->myTotalLeftSize == 0) {
  //OK
} else {
  //FAIL
}

apn

2012-08-21 16:05

administrator   ~0021303

Last edited: 2012-08-23 13:27

Dear BugMaster,
Branch CR23392 (and products from GIT master) was compiled on Linux and Windows platforms and tested.

Regression:
Not detected

Improvements:
Not detected

Testing case:
Test case will be added after testing in debug mode.
In optimize mode we get empty report file 'cause function OSD_MAllocHook::CollectBySize::MakeReport does not go into the condition
"if (myArray[i].nbAlloc > 0 || myArray[i].nbFree > 0) "

I modified following test cases and pushed it to branch:
offset wire_unclosed_outside_0_005 C3 C4
offset wire_unclosed_outside_0_025 C3
offset wire_unclosed_outside_0_075 C3

Related Changesets

occt: master 536416f3

2012-08-24 11:08:50

Roman Lygin

Details Diff
0023392: Memory leak in OCAF in debug mode

TDF_LabelNode::Destroy() does not free memory for entry strings TCollection_AsciiString myDebugEntry problem was corrected.
Affected Issues
0023392
mod - src/TDF/TDF_LabelNode.cxx Diff File
mod - tests/offset/wire_unclosed_outside_0_005/C4 Diff File

Issue History

Date Modified Username Field Change
2012-08-19 09:35 Roman Lygin New Issue
2012-08-19 09:35 Roman Lygin Assigned To => szy
2012-08-19 09:35 Roman Lygin File Added: ocaf-leak.zip
2012-08-19 09:51 Roman Lygin Note Added: 0021280
2012-08-19 09:51 Roman Lygin Status new => resolved
2012-08-19 09:56 Roman Lygin Note Added: 0021281
2012-08-19 10:21 abv Note Added: 0021282
2012-08-19 10:21 abv Assigned To szy => bugmaster
2012-08-19 10:21 abv Status resolved => reviewed
2012-08-19 11:04 Roman Lygin Note Added: 0021284
2012-08-21 16:05 apn Note Added: 0021303
2012-08-21 16:11 apn Test case number => Not needed
2012-08-21 16:11 apn Status reviewed => tested
2012-08-21 16:46 apn Note Edited: 0021303
2012-08-21 16:46 apn Note Edited: 0021303
2012-08-21 18:15 apn Status tested => assigned
2012-08-21 18:16 apn Status assigned => resolved
2012-08-21 18:16 apn Status resolved => reviewed
2012-08-21 18:16 apn Assigned To bugmaster => apn
2012-08-23 13:06 abv Relationship added related to 0023393
2012-08-23 13:12 apn Note Edited: 0021303
2012-08-23 13:13 apn Test case number Not needed =>
2012-08-23 13:13 apn Assigned To apn => bugmaster
2012-08-23 13:13 apn Status reviewed => tested
2012-08-23 13:26 apn Note Edited: 0021303
2012-08-23 13:27 apn Note Edited: 0021303
2012-08-27 16:17 rln Changeset attached => occt master 536416f3
2012-08-27 16:17 rln Assigned To bugmaster => rln
2012-08-27 16:17 rln Status tested => verified
2012-08-27 16:17 rln Resolution open => fixed
2012-08-31 11:58 aiv Assigned To rln => Roman Lygin
2012-09-03 17:52 bugmaster Target Version => 6.5.4
2012-11-16 13:14 bugmaster Fixed in Version => 6.5.4
2012-11-16 13:17 bugmaster Status verified => closed