MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025164Open CASCADE[OCCT] OCCT:Visualizationpublic2014-08-19 10:152014-11-11 12:58
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.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
Attached Files

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

-  Notes
(0031726)
git (administrator)
2014-09-15 18:08

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
(0031727)
dbp (developer)
2014-09-15 18:09

Dear abv,

please review the patch in branch CR25164.
(0031834)
abv (manager)
2014-09-17 18:58

No remarks, please integrate (no testing is needed, I suppose)
(0031907)
git (administrator)
2014-09-19 15:50

Branch CR25164 has been updated forcibly by mkv.

SHA-1: 764b86abf0ab1bacf1df98ff3904c4fe42e387b2
(0031931)
mkv (tester)
2014-09-22 10:13

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.
(0032346)
git (administrator)
2014-09-29 23:14

Branch CR25164 has been deleted by kgv.

SHA-1: 764b86abf0ab1bacf1df98ff3904c4fe42e387b2

- Related Changesets
occt: master 418864ae
Timestamp: 2014-09-15 14:08:03
Author: dbp
Committer: bugmaster
Details ] Diff ]
0025164: BVH_Box::Area() might be called on uninitialized data
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


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker