[PATCH] D12247: [libc++] remove possible trailing padding from aligned_storage
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 26 15:38:26 PDT 2015
EricWF added a comment.
In http://reviews.llvm.org/D12247#233717, @yiranwang wrote:
> Hi Eric,
>
> Could you please explain a bit more what is broken specifically? As we can see, sizeof(), _Len, and _Align, and alignof() of "aligned_storage" are all not changed.
That's correct. At the risk of sounding like a broken record those fields have not changed because doing so would break the ABI. Instead my patch fixes the issue your seeing by simply not using __buf_ unless its the correct size and correctly aligned.
The alignment is the important part. Previously we didn't check if `Fn` was alignment compatible with `__buf_`.
http://reviews.llvm.org/D12247
More information about the cfe-commits
mailing list