-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the issue with TypeId alignment on new Rust Apple Silicon
Summary: * `TypeId` is `u128` [in Rust 1.72](rust-lang/rust#109953) * `u128` is 16 bytes aligned on Apple Silicon * we require 8 byte alignment for `StarlarkValue` Maybe we should fix heap allocations: insert padding to allow any alignment. But practically we don't need it and should not do it: generated machine code is identical for aligned and 8-byte aligned `u128`: [compiler explorer](https://rust.godbolt.org/z/96KsnjW77) (note it is identical if we load it from memory not pass by value, but this is what we do). So for now just force 8 byte alignment on `TypeId`. Fixes issue facebook/buck2#408 Reviewed By: ndmitchell, shayne-fletcher Differential Revision: D49019964 fbshipit-source-id: 62c8d7db83e9e4bdbe58fe7a62d5daae41996e61
- Loading branch information
1 parent
1548298
commit 3e7b661
Showing
2 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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