[PATCH] D99790: [CGCall] Annotate `this` argument with alignment

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 8 14:48:45 PDT 2021


jyknight added a comment.

In D99790#2677917 <https://reviews.llvm.org/D99790#2677917>, @brooksmoses wrote:

> As a heads up, I'm seeing segfaults on internal code as a result of this change, as well as errors in Eigen's unalignedassert.cpp test (specifically, this line asserts: https://github.com/madlib/eigen/blob/master/test/unalignedassert.cpp#L151).

Eigen's case is UB -- the test case is verifying that the constructor of the Matrix type throws an exception if called on an under-aligned instance, I think in an effort to make the UB noisier for their users. It already didn't work in GCC, and they had a "workaround", here, https://github.com/madlib/eigen/blob/fa14b05455c9d9737ae577f686188ef358df9020/Eigen/src/Core/DenseStorage.h#L63

It's unsurprising that this change in Clang causes the same code to fail in Clang, too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99790



More information about the cfe-commits mailing list