detecting "container overflow" bugs in std::vector
Jonathan Wakely
jwakely@redhat.com
Thu May 29 14:29:00 GMT 2014
On 26/05/14 19:19 +0400, Konstantin Serebryany wrote:
>> It does look useful but I'm concerned about a proliferation of
>> container checks, we already have the libstdc++ Debug Mode
>> and I'd
>> like to see some of the lightweight checks from the Google branch
>> added to trunk too.
>Me too, but these checks are mostly orthogonal to the proposed annotations.
Thanks for clarifying that (and to Paul).
>> Aren't they still much cheaper than asan
>> instrumentation?
>
>Of course, they are much cheaper than asan. But they do not cover the case
>that motivated the container overflow annotations (when the contents
>of vector are accessed via
>vector<T>::data())
Yes, I don't think I've ever seen that error in code I work with, but
if Asan can be made to detect it then I'm in favour of the changes.
Thanks.
More information about the Libstdc++
mailing list