clang-randstruct / llvm-project

Randomize the order of fields in a structure layout as a compile-time hardening feature
3 stars 1 forks source link

Autoselect #29

Closed Jafosterja closed 5 years ago

Jafosterja commented 5 years ago

Added basic implantation of automatic structure selection. This implementation will auto select structures full of entirely function pointers.

Closes #5 Closes #32

tim-pugh commented 5 years ago

I know this wasn't written in as an acceptance criteria, but I think this PR should include the command line argument to enable automatic structure selection so that if it's included with our RFC then we are feature-complete.

This was discussed in the meeting after you left but they're working on it Wed

connorkuehl commented 5 years ago

PR looks feature-complete. The no_randomize_layout attribute is not in develop, so struct notautoselect from James's poc.c will be auto-selected.

Argument is used like:

clang -randstruct-auto poc.c -o poc

image