Skip to content

Conversation

@zcyemi
Copy link

@zcyemi zcyemi commented Oct 8, 2025

The previous implementation of ctz32 incorrectly used _BitScanForward,
which can cause division by zero exception(Crash) in js_atod when using like var x = 3.0.

Details:
in js_atod

radix_shift = ctz32(radix);
radix1 = radix >> radix_shift;

ctz32 return wrong value making radix1 to be 0, which propagates to mul_pow and causes l = (f + d - 1) / d with d = 0.
Then crash.

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.

1 participant