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

std: non-byte-multiple sized integers have no definite representation #7447

Merged
merged 3 commits into from Dec 23, 2020

Conversation

LemonBoy
Copy link
Contributor

Closes #7445

@LemonBoy
Copy link
Contributor Author

LemonBoy commented Dec 14, 2020

We can relax the definition of "definite representation" to bits % 8 == 0, I believe the true problem is mem.asBytes using @sizeOf instead of calculating the effective byte size from the bit one.

Edit: putting this on hold, gotta check a few things more.

@LemonBoy LemonBoy closed this Dec 14, 2020
@LemonBoy LemonBoy reopened this Dec 17, 2020
auto_hash must be extra careful when hashing integers whose bit size is
not a multiple of 8 as, when reinterpreted with mem.asBytes, may contain
undefined non-zero bits too.
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.

Inconsistent auto hashing of non-byte-multiple integers
2 participants