View Issue Details

IDProjectCategoryView StatusLast Update
0021954CommunityOCCT:Foundation Classespublic2016-01-07 21:57
ReporterabvAssigned Toabv 
PrioritynormalSeveritytrivial 
Status closedResolutionno change required 
OSAll 
Fixed in Version7.0.0 
Summary0021954: Problem of copying object to itself reported by Valgrind in SortTools_QuickSort
DescriptionThe problem is reported by OCCT user Jiangtao Hu on 2009-04-07 on the
Projects / Contributions section of opencascade.org,
see http://www.opencascade.org/org/community/projects/?project_id=228:

----

Run opencascade against valgrind, it gives error on overlapping memory for
SortTools_QuickSort.gxx : 32.

I added a check at line 32:

32 if(Middle != (Right - 1)) ----Added check
33 Exchange(TheArray(Middle), TheArray(Right - 1));

The valgrind errors went away.

Jane

-----

The implementation of this function needs revision: it seems that it does not
guarantee that these exchanged elements will be exchanges back in all
situations.
TagsNo tags attached.
Test case number

Attached Files

Activities

vsv

2012-01-20 18:52

developer   ~0019216

The proposed solution seems acceptable because prevents exchange item with itself.

vsv

2012-01-20 18:54

developer  

SortTools_QuickSort.gxx (1,698 bytes)   

vsv

2012-01-20 18:54

developer   ~0019217

Corrected file is attached

vsv

2012-01-24 16:55

developer   ~0019255

Has to be checked and closed

abv

2016-01-07 21:57

manager   ~0049719

SortTools package has been eliminated in context of 0024859

Issue History

Date Modified Username Field Change
2010-10-06 19:01 bugmaster Status closed => assigned
2010-10-06 19:01 bugmaster Resolution suspended => @0@
2010-10-06 19:01 bugmaster Assigned To bugmaster => abv
2011-04-07 18:16 bugmaster Assigned To abv => szy
2011-04-28 17:59 szy Assigned To szy => vsv
2011-08-02 11:23 bugmaster Category OCCT:FDC => OCCT:Foundation Classes
2012-01-20 18:52 vsv Note Added: 0019216
2012-01-20 18:52 vsv Status assigned => resolved
2012-01-20 18:54 vsv File Added: SortTools_QuickSort.gxx
2012-01-20 18:54 vsv Note Added: 0019217
2012-01-24 16:55 vsv Assigned To vsv => abv
2012-01-24 16:55 vsv Note Added: 0019255
2012-01-24 16:55 vsv Status resolved => assigned
2016-01-07 21:57 abv Note Added: 0049719
2016-01-07 21:57 abv Status assigned => closed
2016-01-07 21:57 abv Resolution open => no change required
2016-01-07 21:57 abv Fixed in Version EMPTY => 7.0.0