[PATCH][libcxx] Fix AddressSanitizer false positive with vector::insert

Alexey Samsonov vonosmas at gmail.com
Wed Jul 1 11:14:30 PDT 2015


This is obsoleted by http://reviews.llvm.org/D10859, right?

On Sun, Jun 28, 2015 at 1:06 AM, Stefan Haller <lists at haller-berlin.de>
wrote:

> (First-time contributor here; please bear with me in case I’m doing
> something stupid.)
>
> Here’s a patch that fixes a false positive from AddressSanitizer with
> vector::insert(pos, first, last). It only triggers when the iterator
> arguments aren’t ForwardIterators, and then only if the vector has a
> capacity greater than its size.
>
> The test tries to cover not only the defect case itself (i.e. the first
> “for" loop of the insert method), but also the second half of the insert
> method, which was not broken. Not sure if you would prefer a more minimal
> test that only exercises the bug itself.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>


-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150701/45b30ae7/attachment.html>


More information about the llvm-commits mailing list