View Issue Details

IDProjectCategoryView StatusLast Update
0026448Open CASCADEOCCT:Foundation Classespublic2015-10-23 20:50
ReporterabvAssigned Toabv 
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
Target Version6.9.1Fixed in Version6.9.1 
Summary0026448: Method Prepend() of sequence breaks it if argument is empty sequence
DescriptionMethod Prepend() of sequence (both TCollection and NCollection) nullifies myFirstItem pointer if argument is empty sequence, thus breaking internal consistency. Depending on a situation, this may lead to crashes or unpredictable behavior.
Steps To ReproduceThe following code will cause access violation:

  TColStd_SequenceOfReal aSeq1, aSeq2;
  aSeq1.Append(11.);
  aSeq1.Prepend (aSeq2);
  aSeq1.First(); // access violation here
TagsNo tags attached.
Test case numberbugs fclasses bug26448

Activities

git

2015-07-16 00:34

administrator   ~0043089

Branch CR26448 has been created by abv.

SHA-1: 2e0c3a66eaf4ea35ac8b071492414384e141c448


Detailed log of new commits:

Author: abv
Date: Thu Jul 16 00:34:02 2015 +0300

    0026448: Method Prepend() of sequence breaks it if argument is empty sequence
    
    Check for empty input sequence added in methods Append() and Prepend() of TCollection and NCollection sequences.
    
    Test bugs fclasses bug26448 added

abv

2015-07-16 09:21

manager   ~0043093

Fixed, please review

kgv

2015-07-16 09:30

developer   ~0043094

Please test the patch.

apv

2015-07-21 10:24

tester   ~0043208

Dear BugMaster,

Branch CR26448 from occt git-repository (and IR-2015-07-09 from products git-repository) was compiled on Linux and Windows platforms and tested.
SHA-1: 2e0c3a66eaf4ea35ac8b071492414384e141c448

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

Regressions/Differences:
Not detected

Testing cases:
bugs fclasses bug26448 - OK
http://occt-tests/CR26448-IR-2015-07-09-occt-64/Debian70-64/bugs/fclasses/bug26448.html
http://occt-tests/CR26448-IR-2015-07-09-occt-64/Windows-64-VC10/bugs/fclasses/bug26448.html

Testing on Linux:
Total MEMORY difference: 96444024 / 96656180 [-0.22%]
Total CPU difference: 17635.159999999854 / 17412.329999999754 [+1.28%]

Testing on Windows:
Total MEMORY difference: 57149437 / 56532838 [+1.09%]
Total CPU difference: 16311.932562998732 / 15978.823627698926 [+2.08%]

git

2015-07-27 13:39

administrator   ~0043533

Branch CR26448 has been deleted by kgv.

SHA-1: 2e0c3a66eaf4ea35ac8b071492414384e141c448

Related Changesets

occt: master fac9298e

2015-07-15 21:34:02

abv


Committer: abv Details Diff
0026448: Method Prepend() of sequence breaks it if argument is empty sequence

Check for empty input sequence added in methods Append() and Prepend() of TCollection and NCollection sequences.

Test bugs fclasses bug26448 added
Affected Issues
0026448
mod - src/NCollection/NCollection_BaseSequence.cxx Diff File
mod - src/QABugs/QABugs_19.cxx Diff File
mod - src/TCollection/TCollection_BaseSequence.cxx Diff File
add - tests/bugs/fclasses/bug26448 Diff File

Issue History

Date Modified Username Field Change
2015-07-16 00:09 abv New Issue
2015-07-16 00:09 abv Assigned To => abv
2015-07-16 00:34 git Note Added: 0043089
2015-07-16 09:21 abv Note Added: 0043093
2015-07-16 09:21 abv Assigned To abv => kgv
2015-07-16 09:21 abv Status new => resolved
2015-07-16 09:30 kgv Note Added: 0043094
2015-07-16 09:30 kgv Assigned To kgv => bugmaster
2015-07-16 09:30 kgv Status resolved => reviewed
2015-07-16 17:28 apv Assigned To bugmaster => apv
2015-07-20 18:23 apv Test case number => bugs fclasses bug26448
2015-07-21 10:24 apv Note Added: 0043208
2015-07-21 10:24 apv Assigned To apv => bugmaster
2015-07-21 10:24 apv Status reviewed => tested
2015-07-23 11:55 abv Changeset attached => occt master fac9298e
2015-07-23 11:55 abv Assigned To bugmaster => abv
2015-07-23 11:55 abv Status tested => verified
2015-07-23 11:55 abv Resolution open => fixed
2015-07-27 13:39 git Note Added: 0043533
2015-08-26 11:00 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