Explicitly do not support 16 bit architectures#442
Merged
sanket1729 merged 1 commit intorust-bitcoin:masterfrom Jul 8, 2022
Merged
Explicitly do not support 16 bit architectures#442sanket1729 merged 1 commit intorust-bitcoin:masterfrom
sanket1729 merged 1 commit intorust-bitcoin:masterfrom
Conversation
We cast `u32` to `usize` in a bunch of places, this will cause strange behaviour because of truncation on 16 bit architectures. Add a compile time check to explicitly not support 16 bit architectures.
995f342 to
d02c313
Compare
Kixunil
approved these changes
Jul 1, 2022
apoelstra
approved these changes
Jul 1, 2022
apoelstra
approved these changes
Jul 1, 2022
heap-coder
added a commit
to heap-coder/rust-miniscript
that referenced
this pull request
Sep 27, 2025
…bit architectures
d02c31309985cbae8af4ea0f61272c036737a639 Explicitly do not support 16 bit architectures (Tobin C. Harding)
Pull request description:
We cast `u32` to `usize` in a bunch of places, this will cause strange behaviour because of truncation on 16 bit architectures.
Add a compile time check to explicitly not support 16 bit architectures.
ACKs for top commit:
apoelstra:
ACK d02c31309985cbae8af4ea0f61272c036737a639
Tree-SHA512: 11466e173913c5337f9a4ea03a4df5ee6be809ca32987494881d470c87a41f9cca77dde7ed68289896cce5cc875b89ab34a164ea2f4dc41b9fbe6e0ab9a62e71
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We cast
u32tousizein a bunch of places, this will cause strange behaviour because of truncation on 16 bit architectures.Add a compile time check to explicitly not support 16 bit architectures.