MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0028257Open CASCADE[OCCT] OCCT:Data Exchangepublic2016-12-21 17:292017-05-19 15:36
Reporterkgv 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 7.1.0 
Target Version[OCCT] 7.2.0*Fixed in Version 
Summary0028257: XCAFPrs_Style - uninitialized memory usage within ::HashCode()
DescriptionMethod XCAFPrs_Style::HashCode() aggressively casts structure address to array of integers, which then used for computing hash code. This produces undefined results since the payload of the structure is not multiple of integer and there is a gap between fields.

Also, current implementation of XCAFPrs_Style::SetVisibility() in addition to changing the visibility flag also resets color attributes with the strange comment "for hash codes":
void XCAFPrs_Style::SetVisibility (const Standard_Boolean visibility)
{
  myVisibility = visibility;
  if ( ! visibility ) { UnSetColorSurf(); UnSetColorCurv(); } // for hash codes
}


This behavior is unexpected to user who is certainly not expecting hidden style loosing all other important attributes.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0027772closedabv Foundation Classes - define Standard_Boolean using C++ type "bool" instead of "unsigned int" 

-  Notes
(0063055)
git (administrator)
2017-01-25 20:26

Branch CR28257 has been created by kgv.

SHA-1: e16d5e1650bf11386125a42c05ccead2f1ac9fc7


Detailed log of new commits:

Author: kgv
Date: Wed Jan 25 20:26:27 2017 +0300

    0028257: XCAFPrs_Style - uninitialized memory usage within ::HashCode()
    
    XCAFPrs_Style::HashCode() function has been corrected.
    XCAFPrs_Style::SetVisibility() does not reset assigned colors anymore.
(0063056)
kgv (developer)
2017-01-25 20:27

Patch is ready for review.
(0063142)
san (developer)
2017-01-27 17:54

Branch CR28257 reviewed without remarks, ready for testing.
(0063143)
git (administrator)
2017-01-27 18:11

Branch CR28257 has been updated forcibly by apv.

SHA-1: 341d72cd38a65d5aa6f6cb90bb9d4152e9a64c44
(0063144)
apv (tester)
2017-01-27 18:11

Branch CR28257 has been rebased on the current master
(0063185)
apv (tester)
2017-01-30 12:16

Dear BugMaster,

Branch CR28257 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 341d72cd38a65d5aa6f6cb90bb9d4152e9a64c44

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 63
   Windows: 0
   MacOS: 1150

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 91861354 / 92310271 [-0.49%]
Total CPU difference: 20325.42000000019 / 19914.260000000217 [+2.06%]

Testing on Windows:
Total MEMORY difference: 57614536 / 57618048 [-0.01%]
Total CPU difference: 18543.168065698468 / 18683.178963198647 [-0.75%]
(0063599)
git (administrator)
2017-02-08 11:36

Branch CR28257 has been deleted by kgv.

SHA-1: 341d72cd38a65d5aa6f6cb90bb9d4152e9a64c44

- Related Changesets
occt: master 650efe05
Timestamp: 2017-01-25 17:26:27
Author: kgv
Committer: apn
Details ] Diff ]
0028257: XCAFPrs_Style - uninitialized memory usage within ::HashCode()

XCAFPrs_Style::HashCode() function has been corrected.
XCAFPrs_Style::SetVisibility() does not reset assigned colors anymore.
mod - src/XCAFPrs/XCAFPrs_Style.cxx Diff ] File ]
mod - src/XCAFPrs/XCAFPrs_Style.hxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-12-21 17:29 kgv New Issue
2016-12-21 17:29 kgv Assigned To => gka
2016-12-21 17:30 kgv Assigned To gka => kgv
2016-12-21 17:30 kgv Status new => assigned
2016-12-21 17:31 kgv Product Version 7.1.0 => 6.3.1
2017-01-25 19:45 kgv Summary XCAFPrs_Style - method ::SetVisibility() should not modify color information => XCAFPrs_Style - uninitialized memory usage within ::HashCode()
2017-01-25 19:45 kgv Description Updated View Revisions
2017-01-25 19:45 kgv Steps to Reproduce Updated View Revisions
2017-01-25 20:26 git Note Added: 0063055
2017-01-25 20:27 kgv Note Added: 0063056
2017-01-25 20:27 kgv Assigned To kgv => san
2017-01-25 20:27 kgv Status assigned => resolved
2017-01-27 17:54 san Note Added: 0063142
2017-01-27 17:54 san Assigned To san => bugmaster
2017-01-27 17:54 san Status resolved => reviewed
2017-01-27 17:57 kgv Relationship added related to 0027772
2017-01-27 17:59 kgv Product Version 6.3.1 => 7.1.0
2017-01-27 18:03 apv Assigned To bugmaster => apv
2017-01-27 18:11 git Note Added: 0063143
2017-01-27 18:11 apv Note Added: 0063144
2017-01-27 18:11 apv Test case number => Not needed
2017-01-30 12:16 apv Note Added: 0063185
2017-01-30 12:16 apv Assigned To apv => bugmaster
2017-01-30 12:16 apv Status reviewed => tested
2017-01-30 12:19 kgv Target Version 7.2.0* => 7.2.1
2017-02-03 16:52 apn Changeset attached => occt master 650efe05
2017-02-03 16:52 apn Assigned To bugmaster => apn
2017-02-03 16:52 apn Status tested => verified
2017-02-03 16:52 apn Resolution open => fixed
2017-02-08 11:36 git Note Added: 0063599
2017-03-03 17:41 bugmaster Target Version 7.2.1 => 7.2.0*
2017-03-06 11:53 bugmaster Target Version 7.2.0* => 7.2.1
2017-05-19 15:36 abv Target Version 7.2.1 => 7.2.0*


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker