Make sure the return value of malloc_allocator::allocate
commiteecba69d5506f67ddffd8c4d600012e719f62e45
authorville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 16 Oct 2016 13:31:43 +0000 (16 13:31 +0000)
committerville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 16 Oct 2016 13:31:43 +0000 (16 13:31 +0000)
treeb0a3b3cdc95968a2a11fa2c578ebe45b81008632
parentd9b9453994a95ed3a76fe99a280a1db6168a45b3
Make sure the return value of malloc_allocator::allocate
is zero-initialized so that checking it for non-zero works
later.
* include/ext/malloc_allocator.h (malloc_allocator::allocate):
Initialize the return value.
* testsuite/ext/malloc_allocator/sanity.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241212 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/malloc_allocator.h
libstdc++-v3/testsuite/ext/malloc_allocator/sanity.cc [new file with mode: 0644]