[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers
Bill Wendling via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 11 14:27:36 PDT 2022
void added inline comments.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:17982
+
+ // Maybe randomize the field order. We automatically randomize a structure
+ // of function pointers, unless it has the "no_randomize_layout" attribute.
----------------
xbolva00 wrote:
> Is this allowed by C standard?
Randomizing the layout of a structure of pointers or just randomizing a structure in general?
There is a major restriction to randomizing structures. The programmer must use designated initializers when initializing rather than relying upon a default ordering.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123544/new/
https://reviews.llvm.org/D123544
More information about the cfe-commits
mailing list