-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
-Zrandomize-layoutUnstable option: Randomize the layout of types.Unstable option: Randomize the layout of types.A-reproducibilityArea: Reproducible / deterministic buildsArea: Reproducible / deterministic buildsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Now that it looks like #28951 will be addressed via #37429 , we may have a further obligation to ensure to do what we can to ensure that this doesn't bite people. One way that we could help out would be to randomize the order of struct fields by default when compiling in debug mode. This would only apply to structs that are not tagged with a #repr
, and would effectively act as the #[repr(random)]
proposed by @petrochenkov at #37429 (comment) (actually adding explicit #[repr(random)]
would probably require an RFC, and so is not a prereq for this issue).
NeoLegends, cyplo and akiross
Metadata
Metadata
Assignees
Labels
-Zrandomize-layoutUnstable option: Randomize the layout of types.Unstable option: Randomize the layout of types.A-reproducibilityArea: Reproducible / deterministic buildsArea: Reproducible / deterministic buildsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.