Closed connorkuehl closed 5 years ago
Acceptance criteria:
[x] Add __no_randomize_layout
attribute to the Clang compiler
[x] In the attribute handler (or the entry point of our code), if the structure ALSO HAS randomize_layout
, emit a compiler warning.
[x] In the entry point for our randstruct code, if the structure has __no_randomize_layout
, do not hand it to randstruct!
I suspect we will also want to include this in the regression test suite.
See #20 for an example of this.
Looks like Jeff and I finished this, just waiting for code push on his end.
This code got reverted at some point; we need it back.
Closed in #39
Is your feature request related to a problem? Please describe. One of our stretch goals requires this feature to allow application programmers to opt out of automatic structure selection.
Describe the solution you'd like When Clang hands control to our plugin for a structure layout, we will immediately check to see if the structure has a
__no_randomize_layout
attribute attached to it. If so, we will not randomize this structure's layout. We willreturn false;
and have Clang lay it out for us normally.