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

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 10:38:45 PDT 2023


efriedma added a comment.

I also think it makes sense to fix the alignment when we lower the metadata, not in the frontend, unless I'm missing something.

It's not clear to me how "strict-align" is relevant; if sanitizer lowering is generating "align 4" loads, the relevant pointers need to be appropriately aligned regardless of the cost of unaligned loads.  Misaligned loads are undefined behavior in LLVM IR on all targets.  (32-bit ARM in particular has cases where 32-bit unaligned loads are supported, but certain load instruction variations enforce alignment.)


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