View Issue Details

IDProjectCategoryView StatusLast Update
0026287Open CASCADEOCCT:Foundation Classespublic2015-10-23 20:50
ReportermynAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version6.9.0 
Target Version6.9.1Fixed in Version6.9.1 
Summary0026287: Bug in NCollection_AccAllocator::Free() sometimes causes crash in debug mode
Description64-bit Windows library built in debug mode can crash when using NCollection_AccAllocator in the following scenario:
1. some data is allocated in an NCollection_AccAllocator instance;
2. all the data is freed;
3. trying to allocate anything again in the same allocator instance.

The root cause of the problem is a bug in NCollection_AccAllocator::Free() method.
When last allocation in last memory block is freed, the memory block is reallocated to default size, but its key is not updated. The key is based on the block's address, so if the reallocation of the block changes its address, the key becomes invalid that causes failure at subsequent allocation.
Steps To ReproduceNot possible
TagsNo tags attached.
Test case numberNot needed

Activities

git

2015-05-28 16:32

administrator   ~0041676

Branch CR26287 has been created by myn.

SHA-1: d674be1100e4f41f934756a75de46db8b99d8d86


Detailed log of new commits:

Author: myn
Date: Thu May 28 16:20:14 2015 +0300

    0026287: Bug in NCollection_AccAllocator::Free() sometimes causes crash in debug mode

myn

2015-05-28 16:38

developer   ~0041677

Please review branch CR26287

abv

2015-05-29 08:55

manager   ~0041692

Last edited: 2015-05-29 10:17

No remarks, please check compilation and integrate (no testing is needed since that class is not used neither in OCCT nor in products)

epv

2015-05-29 10:11

reporter   ~0041694

Dear Andrey, this class is used in LPKF project.

abv

2015-05-29 10:17

manager   ~0041696

Sorry, I meant "OCCT products", not "SD projects" -- will correct my note

git

2015-05-29 16:00

administrator   ~0041743

Branch CR26287 has been updated forcibly by apv.

SHA-1: 26dda48893a2672413d9c5b3d7a1d13d2642cf16

apv

2015-05-29 16:01

tester   ~0041745

Branch CR26287 has been rebased on the current master

apv

2015-06-01 11:31

tester   ~0041771

Dear BugMaster,

Branch CR26287 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms.
SHA-1: 26dda48893a2672413d9c5b3d7a1d13d2642cf16

Number of compiler warnings:
occt component:
   Linux: 25 (25 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 37 (37 on master)
   Windows: 0 (0 on master)

git

2015-07-27 13:48

administrator   ~0043553

Branch CR26287 has been deleted by kgv.

SHA-1: 26dda48893a2672413d9c5b3d7a1d13d2642cf16

Related Changesets

occt: master 7c47a3d6

2015-05-28 13:20:14

myn


Committer: bugmaster Details Diff
0026287: Bug in NCollection_AccAllocator::Free() sometimes causes crash in debug mode Affected Issues
0026287
mod - src/NCollection/NCollection_AccAllocator.cxx Diff File
mod - src/NCollection/NCollection_AccAllocator.hxx Diff File

Issue History

Date Modified Username Field Change
2015-05-28 15:59 myn New Issue
2015-05-28 15:59 myn Assigned To => myn
2015-05-28 16:32 git Note Added: 0041676
2015-05-28 16:38 myn Note Added: 0041677
2015-05-28 16:38 myn Assigned To myn => abv
2015-05-28 16:38 myn Status new => resolved
2015-05-28 16:38 myn Steps to Reproduce Updated
2015-05-29 08:55 abv Note Added: 0041692
2015-05-29 08:55 abv Assigned To abv => bugmaster
2015-05-29 08:55 abv Status resolved => reviewed
2015-05-29 10:11 epv Note Added: 0041694
2015-05-29 10:17 abv Note Added: 0041696
2015-05-29 10:17 abv Note Edited: 0041692
2015-05-29 12:45 mkv Assigned To bugmaster => apv
2015-05-29 16:00 git Note Added: 0041743
2015-05-29 16:01 apv Note Added: 0041745
2015-05-29 21:25 myn Description Updated
2015-06-01 11:30 apv Test case number => Not needed
2015-06-01 11:31 apv Note Added: 0041771
2015-06-01 11:31 apv Assigned To apv => bugmaster
2015-06-01 11:31 apv Status reviewed => tested
2015-06-05 15:00 bugmaster Changeset attached => occt master 7c47a3d6
2015-06-05 15:00 bugmaster Status tested => verified
2015-06-05 15:00 bugmaster Resolution open => fixed
2015-06-08 12:31 bugmaster Target Version => 7.0.0
2015-07-27 13:48 git Note Added: 0043553
2015-08-26 11:08 abv Target Version 7.0.0 => 6.9.1
2015-10-16 14:56 aiv Status verified => closed
2015-10-23 20:50 aiv Fixed in Version => 6.9.1