-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
My understanding that ASIO_HAS_STD_ALIGNED_ALLOC should be enabled when clang libc++ library supports this on Linux platform.
I've detected this is not the case when UBsan flagged an issue in one of our unit tests that use ASIO library.
The ASIO uses _LIBCPP_HAS_ALIGNED_ALLOC to learn if libc++ defines std::aligned_new.
I didn't manage to find this define in llvm codebase. I found these though:
- _LIBCPP_HAS_NO_ALIGNED_ALLOCATION is defined when either library or compiler lack support. I didn't trace when it was introduced but 2018 version defines it
- _LIBCPP_HAS_ALIGNED_ALLOCATION is inverse of
_LIBCPP_HAS_NO_ALIGNED_ALLOCATIONbut only available since Oct 12,2024
I gravitate towards using !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) in this check
Metadata
Metadata
Assignees
Labels
No labels