MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030551Community[OCCT] OCCT:Foundation Classespublic2019-03-09 17:582019-03-12 14:05
Reportergalbramc 
Assigned Toabv 
PrioritynormalSeveritymajor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 7.3.0 
Target VersionFixed in Version 
Summary0030551: Foundation Classes - Integer overflow in NCollection_CellFilter HashCode
DescriptionI compiled OCCT with the -fsanitize=undefined flag and got the following errors:

src/NCollection/NCollection_CellFilter.hxx:328:25: runtime error: left shift of 79114230870873 by 21 places cannot be represented in type 'long int'
src/NCollection/NCollection_CellFilter.hxx:328:25: runtime error: left shift of 79088553295872 by 21 places cannot be represented in type 'long int'

I can provide a specific example string that reproduces this if needed.

A simple fix is to change 'long aCode' to 'Standard_Size aCode', as well as the return value of the HashCode function.
Steps To ReproduceCompile OCCT with a g++ newer than 4.9 with the -fsanitize=undefined compiler flag and run the test suite.
TagsNo tags attached.
Test case number
Attached Files

- Relationships
child of 0030557newkgv Open CASCADE Coding - eliminate errors reported by -fsanitize 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2019-03-09 17:58 galbramc New Issue
2019-03-09 17:58 galbramc Assigned To => abv
2019-03-12 04:39 galbramc Assigned To abv => kgv
2019-03-12 14:04 kgv Assigned To kgv => abv
2019-03-12 14:04 kgv Summary Integer overflow in NCollection_CellFilter HashCode => Foundation Classes - Integer overflow in NCollection_CellFilter HashCode
2019-03-12 14:05 kgv Relationship added child of 0030557


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker