On Wed, Aug 26, 2015 at 3:38 PM, Eric Fiselier <e...@efcs.ca> wrote:
> 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.

This seems safe. The downside is that some cases which uses internal
buffer before now will use dynamic allocator which might have some
small performance and memory regression.

David

>
> The alignment is the important part. Previously we didn't check if `Fn` was 
> alignment compatible with `__buf_`.
>
>
> http://reviews.llvm.org/D12247
>
>
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to