You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
saturating_mul for uint64 returns 0xffffffff00000000 instead of UINT64_MAX on overflow #3951
Both the uniform and varying unsigned int64 overloads of saturating_mul give the wrong result when exactly one operand has a nonzero upper 32 bits and the product overflows. They return 0xffffffff00000000 when they should saturate to UINT64_MAX (0xffffffffffffffff).
Other inputs that also return 0xffffffff00000000: saturating_mul(0x8000000000000001, 2), saturating_mul(0xffffffff00000000, 2), saturating_mul(0x100000000, 0x100000000) and the swapped-operand versions of each.
Activity