Re: [PATCH] PR libstdc++/80893 Fix null dereference in vector

2017-06-17 Thread Jonathan Wakely
On 31/05/17 13:45 +0100, Jonathan Wakely wrote: vector does addressof(*ptr) where ptr is returned by allocate(n), but if n==0 that pointer might not be dereferencable. While testing the fix I also found some bugs in the __gnu_test::PointerBase helper that needed correcting. PR libstdc++

[PATCH] PR libstdc++/80893 Fix null dereference in vector

2017-05-31 Thread Jonathan Wakely
vector does addressof(*ptr) where ptr is returned by allocate(n), but if n==0 that pointer might not be dereferencable. While testing the fix I also found some bugs in the __gnu_test::PointerBase helper that needed correcting. PR libstdc++/80893 * include/bits/stl_bvector.h (vect