[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

Bill Wendling via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 15:03:38 PDT 2022


void added a comment.

In D123544#3446519 <https://reviews.llvm.org/D123544#3446519>, @xbolva00 wrote:

>>> If we had error diagnostics when the user is about to shoot their foot off, I'd be more comfortable with the automatic hardening behavior.
>
> This feature IMHO should be enabled with simple easy to understand flag, not silently and automatically do something which may break code or create surprises in debuggers.

A developer has to go out of their way to indicate that they want to use `randstruct`. The attribute has no effect unless they take an extra action to enable it (i.e. passing one of the seed flags). I agree with Aaron though that we need to error out if the developer uses default initialization for a randomized structure.


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