Fix integer overflow in ConcurrentHashtTableByPtr
This change fixes a case where there was a potential integer overflow when multiplying two 32-bit values and assigning the result to a 64-bit value. The potential overflow has been present since https://reviews.llvm.org/D132455 was re-landed. The initial version of the patch defined MaxBucketSize and NumberOfBuckets as size_t (which I guess would still be a problem for some targets). When the patch was re-landed they were defined as uint32_t, making the calculation of ExtHashMask subject to overflow. Differential Revision: https://reviews.llvm.org/D158117
Loading
Please sign in to comment