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

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 9 00:15:31 PDT 2021


lebedev.ri added a comment.

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

> In D99790#2677919 <https://reviews.llvm.org/D99790#2677919>, @lebedev.ri wrote:
>
>> 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).
>>
>> Would be good to have a small standalone reproducer.
>> Not really sure how we can end up with a misaligned `this`, but it sounds like UB.
>
> Indeed, it's looking like all of the various segfaults are resulting from undefined behavior, just like the Eigen assert was (per @jyknight's comment).  One of the segfaults is in the OpenJDK runtime -- albeit our internal copy, so it's possible it might not be in the external versions -- so that's fun.  Luckily it shows up in the bootstrapping part of the build, rather than lying in wait to bite people after it's deployed.
>
> In any case, thanks for the quick reply, and I'll figure out a small reproducer if we find something that isn't UB.

Nono, you misunderstand, i want the samples *with* UB.
I will then revert this, and add UBSan check to catch that UB first.


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