[Bug libstdc++/70940] pmr::resource_adaptor requires optional allocator requirements and incorrectly aligns returned pointers.
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 4 09:38:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70940
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Also:
__null_memory_resource::do_is_equal() is missing a return statement, so returns
garbage off the stack.
__null_memory_resource doesn't need to be a class template.
new_delete_resource() returns something that:
- doesn't have the required is_equal() behaviour.
- only uses new/delete if std::allocator uses __gnu_cxx::new_allocator.
And another one from Eric:
Your new_delete_resource() also unnecessarily pads the allocation size before
invoking ::operator new, but that isn't a real bug.
More information about the Gcc-bugs
mailing list