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

Tracking issue for -Z randomize-layout #106764

Open
1 of 3 tasks
dtolnay opened this issue Jan 12, 2023 · 1 comment
Open
1 of 3 tasks

Tracking issue for -Z randomize-layout #106764

dtolnay opened this issue Jan 12, 2023 · 1 comment
Labels
-Zrandomize-layout Unstable option: Randomize the layout of types. A-CLI Area: Command-line interface (CLI) to the compiler A-layout Area: Memory layout of types C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@dtolnay
Copy link
Member

dtolnay commented Jan 12, 2023

This is a tracking issue for the unstable rustc flag -Zrandomize-layout. (rust-lang/compiler-team#457)

About tracking issues

Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

Implementation history

@dtolnay dtolnay added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC A-layout Area: Memory layout of types labels Jan 12, 2023
@saethlin

This comment was marked as resolved.

@workingjubilee workingjubilee added A-CLI Area: Command-line interface (CLI) to the compiler -Zrandomize-layout Unstable option: Randomize the layout of types. labels Mar 5, 2023
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 24, 2024
`-Zrandomize-layout` harder. `Foo<T> != Foo<U>`

Tracking issue: rust-lang#106764

Previously randomize-layout only used a deterministic shuffle based on the seed stored in an Adt's ReprOptions, meaning that `Foo<T>`  and `Foo<U>` were shuffled by the same seed. This change adds a similar seed to each calculated LayoutData so that a struct can be randomized both based on the layout of its fields and its per-type seed.
Primitives start with simple seed derived from some of their properties. Though some types can no longer be distinguished at that point, e.g. usize and u64 will still be treated the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Zrandomize-layout Unstable option: Randomize the layout of types. A-CLI Area: Command-line interface (CLI) to the compiler A-layout Area: Memory layout of types C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants