Closed
Description
This bit of code seems to have a bug where it is missing the carry bit. This was discovered when I was porting the function to Rust's compiler-rt and results of unit tests disagreed with Python, see rust-lang/compiler-builtins#587 (comment) and the followup discussion.
To reproduce - "0xffffffffffffffffffffffffffffffff * 0xffffffffffffffffffffffffffffffff
should be 0xfffffffffffffffffffffffffffffffe00000000000000000000000000000001
, but this function returns 0xfffffffffffffffffffffffffffffffd00000000000000000000000000000001
.
cc @marthadev who found a fix for the Rust side.
Appears to cause #91840 (comment)