Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build for 32bit targets (usize == u32) #5306

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

ubamrein
Copy link
Contributor

Description

Fixes #5303

As usize's size is platform dependent (usually the pointer size), the bit shift, which is inlined during compilation, leads to an overflow on 32bit platforms.

By explicitly casting both sides to u64, we ensure that the constant (1<<32) will not overflow during compilation.

@syrusakbary syrusakbary merged commit 8b1f1b1 into wasmerio:main Dec 17, 2024
71 of 72 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.

C-Api cannot be built for 32bit targets
2 participants