]> gcc.gnu.org Git - gcc.git/commit
PR libstdc++/80893 Fix null dereference in vector<bool>
authorJonathan Wakely <jwakely@redhat.com>
Wed, 31 May 2017 12:41:45 +0000 (13:41 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 31 May 2017 12:41:45 +0000 (13:41 +0100)
commit046a84762b7954d43d14aa8b7e48bf07b8117270
tree95490e31c659a8509105b5345bf60e3ac3c33a0a
parentbde63fdea41c6c9952ab3607eb497d5c698e85c3
PR libstdc++/80893 Fix null dereference in vector<bool>

PR libstdc++/80893
* include/bits/stl_bvector.h (vector<bool>::_M_initialize): Avoid
null pointer dereference when size is zero.
* testsuite/23_containers/vector/bool/80893.cc: New.
* testsuite/util/testsuite_allocator.h (PointerBase::PointerBase):
Add non-explicit constructor from nullptr.
(PointerBase::derived() const): Add const-qualified overload.

From-SVN: r248734
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_bvector.h
libstdc++-v3/testsuite/23_containers/vector/bool/80893.cc [new file with mode: 0644]
libstdc++-v3/testsuite/util/testsuite_allocator.h
This page took 0.052393 seconds and 5 git commands to generate.