Skip to content

7f60f27 can lead to ODR violations #1682

@JulesRapanga

Description

@JulesRapanga

boostorg/asio@7f60f27 was presumably meant to address #1644 but for me it's caused much worse issues.

In my case it was building a library with GCC with -fhardened which sets _FORTIFY_SOURCE=3, but then I was using that library in a downstream project which has a --coverage build, which in GCC unsets _FORTIFY_SOURCE. This means that a struct defined in the library's header which contained a boost::asio::ip::udp::endpoint had a difference size in the library and in the application, which is an ODR violation (ill-formed, no diagnostic required).

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