This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC 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]

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


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