This is the mail archive of the
mailing list for the libstdc++ project.
Re: [patch][google/integration] Add lightweight checks to vector::begin et. al. (issue4973065)
On Tue, Sep 6, 2011 at 2:51 PM, Jonathan Wakely <firstname.lastname@example.org> wrote:
> I don't mean for vector::begin and the other functions in that patch,
> I mean in general for member functions of any type. There are plenty
> of functions that wouldn't crash when called through a null pointer.
> But even std:vector has member functions like that, such as max_size.
Right. (We might tweak the compiler to automagically insert that assert
in non-omitimized builds ;-)
> Anyway, I think we've concluded the patch is not suitable for general
> use, as it has limited value without a debugging allocator that makes
> pages dirty after free.
Agreed. I'll rename __is_valid to _M_is_valid to match the rest of the file,
and submit to google/integration only.
Thanks for your comments,