View Issue Details

IDProjectCategoryView StatusLast Update
0025770Open CASCADEOCCT:Codingpublic2015-05-14 15:32
ReporteramlAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.9.0 
Target Version6.9.0Fixed in Version6.9.0 
Summary0025770: Possible "invalid memory access"
DescriptionThere are several places, where array index may be out of borders:

I
GeomInt_LineConstructor.cxx

pVtx=new GeomInt_RealWithFlag [aNbVtx];
...

for(i=0; i<aNbVtx; ++i) {
  aT=pVtx[i+1].Value();
  pVtx[i].SetValue(aT);
}

iteration with i = aNbVtx - 1 leads to problems.

II
Approx_SameParameter.cxx

...
if (New_NCONTROL > aMaxArraySize) {
...

This is incorrect in case when New_NCONTROL = aMaxArraySize - 1 then "count" will store incorrect index.



Steps To ReproduceI obtained draw fail on test:
offset shape_type_i C5

This behavior occurred only on my development branch and one of older IR, on current master problem seems to be not producible.
TagsNo tags attached.
Test case numberNot needed

Activities

git

2015-01-30 13:14

administrator   ~0036884

Branch CR25770 has been created by aml.

SHA-1: 3229e40a821dc6a35f961a74796eaf55cb8ca977


Detailed log of new commits:

Author: aml
Date: Fri Jan 30 13:13:06 2015 +0300

    0025770: Possible "invalid memory access"
    
    Memory problems fixed.

aml

2015-01-30 13:16

developer   ~0036885

Dear abv,
Please check current state of branch CR25770.

abv

2015-02-02 06:34

manager   ~0036938

No remarks, please test.

Alexander, please describe how this issue was / can be reproduced.

git

2015-02-03 10:14

administrator   ~0037004

Branch CR25770 has been updated forcibly by mkv.

SHA-1: e6d76ecace1a0f7fd5f112e9b3750e613ab4ae09

mkv

2015-02-04 10:49

tester   ~0037044

Dear BugMaster,
Branch CR25770 was rebased on current master of occt git-repository.

mkv

2015-02-04 10:49

tester   ~0037045

Dear BugMaster,
Branch CR25770 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: e6d76ecace1a0f7fd5f112e9b3750e613ab4ae09

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 370061368 / 370076844
Total CPU difference: 54250.06 / 49863.81000000002
products component :
Total MEMORY difference: 110280492 / 110262492
Total CPU difference: 16151.459999999981 / 15779.419999999973

Testing on Windows:
occt component :
Total MEMORY difference: 275853912 / 276284192
Total CPU difference: 36617.546875 / 36894.109375
products component :
Total MEMORY difference: 72489552 / 71401072
Total CPU difference: 10948.828125 / 11731.96875

There are no differences in images found by testdiff.

git

2015-03-18 13:37

administrator   ~0038583

Branch CR25770 has been deleted by inv.

SHA-1: e6d76ecace1a0f7fd5f112e9b3750e613ab4ae09

Related Changesets

occt: master 31e0b8e8

2015-01-30 10:13:06

aml


Committer: bugmaster Details Diff
0025770: Possible "invalid memory access"

Memory problems fixed.
Affected Issues
0025770
mod - src/Approx/Approx_SameParameter.cxx Diff File
mod - src/GeomInt/GeomInt_LineConstructor.cxx Diff File

Issue History

Date Modified Username Field Change
2015-01-30 13:11 aml New Issue
2015-01-30 13:11 aml Assigned To => aml
2015-01-30 13:14 git Note Added: 0036884
2015-01-30 13:16 aml Note Added: 0036885
2015-01-30 13:16 aml Assigned To aml => abv
2015-01-30 13:16 aml Status new => resolved
2015-01-30 13:16 aml Steps to Reproduce Updated
2015-02-02 06:34 abv Note Added: 0036938
2015-02-02 06:34 abv Assigned To abv => bugmaster
2015-02-02 06:34 abv Status resolved => reviewed
2015-02-02 07:28 aml Steps to Reproduce Updated
2015-02-03 09:42 mkv Assigned To bugmaster => mkv
2015-02-03 10:14 git Note Added: 0037004
2015-02-04 10:49 mkv Note Added: 0037044
2015-02-04 10:49 mkv Note Added: 0037045
2015-02-04 10:49 mkv Assigned To mkv => bugmaster
2015-02-04 10:49 mkv Status reviewed => tested
2015-02-04 10:50 mkv Test case number => Not needed
2015-02-06 15:38 bugmaster Changeset attached => occt master 31e0b8e8
2015-02-06 15:38 bugmaster Status tested => verified
2015-02-06 15:38 bugmaster Resolution open => fixed
2015-03-18 13:37 git Note Added: 0038583
2015-05-14 15:29 aiv Status verified => closed
2015-05-14 15:32 aiv Fixed in Version => 6.9.0