MantisBT - Community
View Issue Details
0027544Community[OCCT] OCCT:Modeling Algorithmspublic2016-05-26 15:252016-12-09 16:38
FredK 
bugmaster 
normalblock 
closedfixed 
[OCCT] 6.9.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
0027544: problem compiling OCCT with gcc version 4.8.2 gives error 'array subscript is above array bounds'
When compiling the OpenCASCADE library with gcc compiler version 4.8.2, the compiler generates the error 'array subscript is above array bounds' with the following code in IntPatch/IntPatch_InterferencePolyhedron.cxx:

line 903:
      if (nob>=0) {
    while (nob<nbNoInserted) {
      piToInsert[nob]=piToInsert[nob+1]; // here the error is generated
      nob++;
    }
    nbNoInserted--;
    nob=nbNoInserted-1;
      }
Compile OpenCascade\src\IntPatch\IntPatch_InterferencePolyhedron.cxx with gcc 4.8.2

#Test case is not applicable.
fix:

line 903:
      if (nob>=0) {
    while (nob<nbNoInserted) {
      if (nob + 1 < 6)
        piToInsert[nob]=piToInsert[nob+1];
      nob++;
    }
    nbNoInserted--;
    nob=nbNoInserted-1;
      }
No tags attached.
related to 0026852closed abv Open CASCADE Coding - compiler warnings issued by GCC 5.2.1 
Issue History
2016-05-26 15:25FredKNew Issue
2016-05-26 15:25FredKAssigned To => kgv
2016-05-26 15:48kgvRelationship addedrelated to 0026852
2016-05-26 15:52kgvNote Added: 0054451
2016-05-26 15:52kgvAssigned Tokgv => msv
2016-05-26 18:28abvCategoryOCCT:Coding => OCCT:Modeling Algorithms
2016-05-26 19:01msvAssigned Tomsv => aml
2016-05-26 19:01msvStatusnew => assigned
2016-05-26 20:09gitNote Added: 0054458
2016-05-31 07:50gitNote Added: 0054551
2016-05-31 11:09gitNote Added: 0054561
2016-05-31 11:10amlNote Added: 0054562
2016-05-31 11:10amlAssigned Toaml => msv
2016-05-31 11:10amlStatusassigned => resolved
2016-05-31 11:10amlSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13795#r13795
2016-05-31 19:27gitNote Added: 0054581
2016-05-31 19:28msvNote Added: 0054582
2016-05-31 19:28msvAssigned Tomsv => bugmaster
2016-05-31 19:28msvStatusresolved => reviewed
2016-05-31 20:10mkvAssigned Tobugmaster => mkv
2016-06-01 12:17mkvAssigned Tomkv => bugmaster
2016-06-02 09:56bugmasterNote Added: 0054614
2016-06-02 09:56bugmasterStatusreviewed => tested
2016-06-03 12:50bugmasterChangeset attached => occt master 93dc7934
2016-06-03 12:50bugmasterStatustested => verified
2016-06-03 12:50bugmasterResolutionopen => fixed
2016-06-03 13:12gitNote Added: 0054664
2016-07-25 14:42bugmasterTarget Version => 7.1.0
2016-12-09 16:31aivStatusverified => closed
2016-12-09 16:38aivFixed in Version => 7.1.0

Notes
(0054451)
kgv   
2016-05-26 15:52   
The original code looks strange, or I misunderstand it.
Probably there might be a bug.
(0054458)
git   
2016-05-26 20:09   
Branch CR27544 has been created by aml.

SHA-1: 60ea52b523c28436faf745c5293bff3ec9f37792


Detailed log of new commits:

Author: aml
Date: Thu May 26 20:08:48 2016 +0300

    0027544: problem compiling OCCT with gcc version 4.8.2 gives error 'array subscript is above array bounds'
    
    Possible out of borders problem is fixed.
(0054551)
git   
2016-05-31 07:50   
Branch CR27544 has been updated forcibly by aml.

SHA-1: 53712ef65810a44695eea7910ea1e6c65ea18821
(0054561)
git   
2016-05-31 11:09   
Branch CR27544 has been updated forcibly by aml.

SHA-1: 67ad0ec9a24960de8f32cc59322bbd913fbc9898
(0054562)
aml   
2016-05-31 11:10   
Dear msv,
Please check current state of the CR27544 branch.
(0054581)
git   
2016-05-31 19:27   
Branch CR27544 has been updated forcibly by aml.

SHA-1: bf81f9e4cbc1eed830bc8b047d42821fa1aad14a
(0054582)
msv   
2016-05-31 19:28   
Reviewed.
(0054614)
bugmaster   
2016-06-02 09:56   
Fix has been successfully compile on all platforms.
(0054664)
git   
2016-06-03 13:12   
Branch CR27544 has been deleted by inv.

SHA-1: bf81f9e4cbc1eed830bc8b047d42821fa1aad14a