[PATCH] D12970: SmallVector fix for use-after-dtor bug.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 17:05:02 PDT 2015
On Fri, Sep 18, 2015 at 3:13 PM, Evgeniy Stepanov via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> eugenis added a comment.
>
> The problem is this:
> SmallVectorTemplateCommon only has space for the first element of the
> vector; the rest of the space is provided by SmallVector and used by
> effectively overflowing the field SmallVectorTemplateCommon. Sanitizers are
> OK with it because the memory is, in fact, allocated.
>
> Use-after-destroy detector complains about ~SmallVectorTemplateCommon
> accessing memory that belongs to SmallVector (the destructor for that has
> already ran at the point) when calling destructors for individual vector
> elements in destroy_range.
Ah, once I put all the dtor execution order straight in my head, I see it.
>
>
> http://reviews.llvm.org/D12970
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150918/f1cb82e3/attachment.html>
More information about the llvm-commits
mailing list