[PATCH] D116861: [UBSan] Fix incorrect alignment reported when global new returns an offset pointer

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 8 15:07:17 PST 2022


rjmccall added a comment.

If we want to assume a weaker alignment, we should change the calculation of `allocationAlign` rather than just changing this point downstream of that computation.  But replacements of the standard `operator new` are restricted and cannot simply choose to return less-aligned memory; at the very least, the test program is not portable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116861



More information about the cfe-commits mailing list