Skip to content
Commit 6664e80a authored by Andy Kaylor's avatar Andy Kaylor
Browse files

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
parent e698695f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment