https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121741

            Bug ID: 121741
           Summary: Using an abi_tag for libstdc++ hardening
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ville.voutilainen at gmail dot com
  Target Milestone: ---

In https://ldionne.com/2025/02/12/ODR-libcxx-hardening-profiles-and-contracts/,
Louis Dionne explains how libc++ uses abi_tag to avoid ODR problems with stdlib
hardening.

Shouldn't libstdc++ employ the same technique?

The problem that approach aims to solve is having multiple definitions of
inline entities emitted in multiple TUs with different hardening flags, which
can result in a caller thinking hardening is on but the linker managing to pick
a definition that has hardening off. (Which is obvious to the people who are
going to consider implementing the approach, but just mentioning it here for
other people, basically. :P)

Reply via email to