This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: detecting "container overflow" bugs in std::vector


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]