[PATCH] D154043: [CodeGen] -fsanitize={function, kcfi}: ensure align 4 if +strict-align

Simon Tatham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 05:41:24 PDT 2023


simon_tatham added a comment.

The details of this approach look good to me, but is this the best place to solve it? Doing it in clang means that //every// language front end that wants to use either of these sanitizers is responsible for doing this same work: tagging every IR function with `align 4` if it also has `!kcfi_type` or `!func_sanitize`, and perhaps also checking the target-features to decide whether to do that.

I'd imagined the problem being solved at a lower level, when converting the IR into actual function prologues, so that all front ends generating IR would benefit from the fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154043/new/

https://reviews.llvm.org/D154043



More information about the cfe-commits mailing list