Skip to content

Fix undefined behavior in portable smulh - #362

Merged
SChernykh merged 1 commit into
tevador:masterfrom
thomasbuilds:fix-portable-smulh
Oct 17, 2026
Merged

SChernykh merged 1 commit into
tevador:masterfrom
thomasbuilds:fix-portable-smulh

Conversation

@thomasbuilds

Copy link
Copy Markdown
Contributor

The portable smulh (used on 32-bit x86 and ARM) does its sign corrections in int64_t and they overflow for about 1 in 10 random inputs.

@SChernykh
SChernykh merged commit 418f549 into tevador:master Oct 17, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants