View Issue Details

IDProjectCategoryView StatusLast Update
0025164Open CASCADEOCCT:Visualizationpublic2014-11-11 12:58
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version6.8.0Fixed in Version6.8.0 
Summary0025164: BVH_Box::Area() might be called on uninitialized data
Description
template<class T, int N>
T BVH_Box<T, N>::Area() const
{
  return BVHTools::SurfaceCalculator<T, N>::Area (myMaxPoint - myMinPoint);
}


within
template<class T, int N, int Bins>
void BVH_BinnedBuilder<T, N, Bins>::BuildNode (BVH_Set<T, N>*         theSet,
                                               BVH_Tree<T, N>*        theBVH,
                                               const Standard_Integer theNode)
...
      // Simple SAH evaluation
      Standard_Real aCost = (static_cast<Standard_Real> (aLftAABB.Area()) /* / aNodeArea */) * aLftCount
                          + (static_cast<Standard_Real> (aRghAABB.Area()) /* / aNodeArea */) * aRghCount;

aLftAABB or aRghAABB might be uninitialized boxes.
The total expression will be negotiated by multiplication with 0, but computation of area might generate FPE.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0024866 newvpozdyayev Single definition of axis-aligned bounding box should be used across OCCT 

Activities

git

2014-09-15 18:08

administrator   ~0031726

Branch CR25164 has been created by dbp.

SHA-1: 39e5d2c9d2de1c7443104842fd0505ba5827112b


Detailed log of new commits:

Author: dbp
Date: Mon Sep 15 18:08:03 2014 +0400

    0025164: BVH_Box::Area() might be called on uninitialized data

dbp

2014-09-15 18:09

developer   ~0031727

Dear abv,

please review the patch in branch CR25164.

abv

2014-09-17 18:58

manager   ~0031834

No remarks, please integrate (no testing is needed, I suppose)

git

2014-09-19 15:50

administrator   ~0031907

Branch CR25164 has been updated forcibly by mkv.

SHA-1: 764b86abf0ab1bacf1df98ff3904c4fe42e387b2

mkv

2014-09-22 10:13

tester   ~0031931

Dear BugMaster,
Branch CR25164 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: 764b86abf0ab1bacf1df98ff3904c4fe42e387b2

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
MacOS: 193 (193 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: 355701816 / 355491316
Total CPU difference: 47616.280000000086 / 44818.970000000096
products component :
Total MEMORY difference: 110267712 / 110250572
Total CPU difference: 19064.299999999992 / 18358.06999999999

Testing on Windows:
occt component :
Total MEMORY difference: 243012508 / 242267280
Total CPU difference: 39189.4375 / 34303.3125
products component :
Total MEMORY difference: 66635428 / 66591984
Total CPU difference: 13574.671875 / 11913.0625

There are no differences in images found by testdiff.

git

2014-09-29 23:14

administrator   ~0032346

Branch CR25164 has been deleted by kgv.

SHA-1: 764b86abf0ab1bacf1df98ff3904c4fe42e387b2

Related Changesets

occt: master 418864ae

2014-09-15 14:08:03

dbp


Committer: bugmaster Details Diff
0025164: BVH_Box::Area() might be called on uninitialized data Affected Issues
0025164
mod - src/BVH/BVH_Box.lxx Diff File

Issue History

Date Modified Username Field Change
2014-08-19 10:15 kgv New Issue
2014-08-19 10:15 kgv Assigned To => kgv
2014-08-19 10:15 kgv Assigned To kgv => dbp
2014-08-19 10:15 kgv Status new => assigned
2014-08-25 11:54 kgv Relationship added related to 0024866
2014-09-15 18:08 git Note Added: 0031726
2014-09-15 18:09 dbp Note Added: 0031727
2014-09-15 18:09 dbp Assigned To dbp => abv
2014-09-15 18:09 dbp Status assigned => resolved
2014-09-17 18:58 abv Note Added: 0031834
2014-09-17 18:58 abv Assigned To abv => bugmaster
2014-09-17 18:58 abv Status resolved => reviewed
2014-09-18 16:19 bugmaster Assigned To bugmaster => mkv
2014-09-19 15:50 git Note Added: 0031907
2014-09-22 10:13 mkv Note Added: 0031931
2014-09-22 10:14 mkv Test case number => Not needed
2014-09-22 10:14 mkv Assigned To mkv => bugmaster
2014-09-22 10:14 mkv Status reviewed => tested
2014-09-26 14:49 bugmaster Changeset attached => occt master 418864ae
2014-09-26 14:49 bugmaster Status tested => verified
2014-09-26 14:49 bugmaster Resolution open => fixed
2014-09-29 23:14 git Note Added: 0032346
2014-11-11 12:45 aiv Fixed in Version => 6.8.0
2014-11-11 12:58 aiv Status verified => closed