This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r248734 - in /trunk/libstdc++-v3: ChangeLog inc...
- From: redi at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Wed, 31 May 2017 12:41:45 -0000
- Subject: r248734 - in /trunk/libstdc++-v3: ChangeLog inc...
Author: redi
Date: Wed May 31 12:41:45 2017
New Revision: 248734
URL: https://gcc.gnu.org/viewcvs?rev=248734&root=gcc&view=rev
Log:
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.
Added:
trunk/libstdc++-v3/testsuite/23_containers/vector/bool/80893.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_bvector.h
trunk/libstdc++-v3/testsuite/util/testsuite_allocator.h