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

PR for llvm/llvm-project#60349 #276

Merged
merged 1 commit into from
Feb 7, 2023
Merged

PR for llvm/llvm-project#60349 #276

merged 1 commit into from
Feb 7, 2023

Conversation

llvmbot
Copy link
Collaborator

@llvmbot llvmbot commented Feb 6, 2023

…zation

If a struct/enum type used in a record doesn't have a forward decl /
def, an implicit one is injected into the struct. This stops clang from
randomizing the structure in some situations---i.e. when the struct
contains only function pointers. So we accept forward decls so they
don't prevent randomization.

Fixes 60349

Reviewed By: MaskRay, nickdesaulniers

Differential Revision: https://reviews.llvm.org/D143300

(cherry picked from commit f85a9a6)
@llvmbot
Copy link
Collaborator Author

llvmbot commented Feb 6, 2023

@MaskRay @nickdesaulniers What do you think about merging this PR to the release branch?

@MaskRay
Copy link
Member

MaskRay commented Feb 6, 2023

LGTM.

This helps with https://lore.kernel.org/r/63deacb1.170a0220.f078.6779@mx.google.com
"This should be fixed with greater precision -- i.e. this is nearly fixed
in Clang now, and is likely to be backported. So I think we'll need
versioned checks here."

@tru tru merged commit 7fed09b into release/16.x Feb 7, 2023
@tru tru deleted the llvm-issue60349 branch February 7, 2023 07:07
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.

-frandomize-layout-seed inconsistently randomizes all-function-pointers structs
4 participants