[Bug libstdc++/77691] [7/8/9 regression] experimental/memory_resource/resource_adaptor.cc FAILs
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 11 17:19:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77691
--- Comment #30 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 45940
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45940&action=edit
Patch to fix resource_adaptor failures due to max_align_t bugs
Could you please try this patch on Soalris and HP-UX?
Commit log:
Remove the hardcoded whitelist of allocators expected to return memory
aligned to alignof(max_align_t), because that doesn't work when the
platform's malloc() and GCC's max_align_t do not agree what the largest
fundamental alignment is.
Instead use a hardcoded list of fundamental types that will definitely
be supported by the platform malloc, and use a copy of the allocator
rebound to the first type that matches the requested alignment.
This means allocations for alignof(__float128) might use additional
memory to store the token, because we can't assume the platform malloc
will return memory aligned to alignof(__float128). Ideally we'd be able
to add __float128 to the list of fundamental types when we know it works
for a given target.
More information about the Gcc-bugs
mailing list