Skip to content

ASIO_HAS_STD_ALIGNED_ALLOC not defined on Linux with clang #1678

@PoiXP

Description

@PoiXP

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:

I gravitate towards using !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) in this check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions