[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 11:51:11 PDT 2022


void added a comment.

In D123544#3446285 <https://reviews.llvm.org/D123544#3446285>, @lebedev.ri wrote:

> Does this not lead to non-deterministic/non-reproducible builds?

It's deterministic based on the randomization seed.

> I do not understand why this feature must be inflicted onto everyone.

A developer must mark structures with the `randomize_layout` attribute and supply a randomization seed for the randstruct feature to be enabled. It's only when a randomization seed is supplied that it'll randomize structures consisting of only function pointers (which happens a lot in Linux). And you're able to opt-out of such a thing.


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