Bug in BigInt::FromWords64 on 32-bit?

55 views
Skip to first unread message

ClearScript Developers

unread,
Feb 27, 2025, 10:19:22 PM2/27/25
to v8-dev
Greetings!

Consider the line here:

    if (kDigitBits == 32 && words[words64_count - 1] <= (1ULL << 32)) length--;

It seems like the goal here is to discard the final 32-bit "half-word" if it's zero. If that's correct, shouldn't the comparison operator be "<" rather than "<="?

Thanks!

Jakob Kummerow

unread,
Feb 28, 2025, 6:55:51 AM2/28/25
to v8-...@googlegroups.com
Yes, that looks like a bug. I'll make a fix. Thanks for the report!

Reply all
Reply to author
Forward
0 new messages