View Issue Details

IDProjectCategoryView StatusLast Update
0030551CommunityOCCT:Foundation Classespublic2019-08-15 17:51
Reportergalbramc Assigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
Product Version7.3.0 
Target Version7.4.0Fixed in Version7.4.0 
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 numberNot required

Relationships

related to 0030550 closedbugmaster Community Coding - Integer overflow in Standard_CString HashCodes 
child of 0030557 newkgv Open CASCADE Coding - eliminate errors reported by -fsanitize 

Activities

tizmaylo

2019-04-22 11:36

developer   ~0083920

Last edited: 2019-04-22 11:37

This issue was fixed as a part of changes made within 0030550: Coding - Integer overflow in Standard_CString HashCodes.

bugmaster

2019-05-06 15:43

administrator   ~0084196

Fixed in framework of 30550

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
2019-03-20 08:37 kgv Assigned To abv => tizmaylo
2019-03-20 08:37 kgv Status new => assigned
2019-04-22 11:33 tizmaylo Target Version => 7.4.0
2019-04-22 11:36 tizmaylo Note Added: 0083920
2019-04-22 11:37 tizmaylo Assigned To tizmaylo => bugmaster
2019-04-22 11:37 tizmaylo Status assigned => feedback
2019-04-22 11:37 tizmaylo Note Edited: 0083920
2019-04-30 14:50 kgv Relationship added related to 0030550
2019-05-06 15:43 bugmaster Note Added: 0084196
2019-05-06 15:43 bugmaster Status feedback => verified
2019-05-06 15:43 bugmaster Resolution open => fixed
2019-08-15 17:51 bugmaster Test case number => Not required