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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-10-01
     Ever confirmed|0                           |1
          Component|libstdc++                   |lto
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
=================================================================
==2962312==ERROR: AddressSanitizer: odr-violation (0x000000405d80):
  [1] size=1 'piecewise_construct'
/home/jwakely/gcc/17/include/c++/17.0.0/bits/stl_pair.h:82:53 in /tmp/demo
  [2] size=1 'piecewise_construct'
/home/jwakely/gcc/17/include/c++/17.0.0/bits/stl_pair.h:82:53 in ./libb.so
These globals were registered at these points:
  [1]:
    #0 0x7f847181e3cf in __asan_register_globals
/home/jwakely/src/gcc/gcc/libsanitizer/asan/asan_globals.cpp:410
    #1 0x000000404b99 in _sub_I_00099_1.5 (/tmp/demo+0x404b99)
    #2 0x7f84712116e3 in __libc_start_main@@GLIBC_2.34
(/lib64/libc.so.6+0x36e3) (BuildId: 4586895ddf125800fcd0df1f77ad693eac681450)
    #3 0x000000400554 in _start (/tmp/demo+0x400554)

  [2]:
    #0 0x7f847181e3cf in __asan_register_globals
/home/jwakely/src/gcc/gcc/libsanitizer/asan/asan_globals.cpp:410
    #1 0x7f84720f2bc8 in _sub_I_00099_1.7 (libb.so+0x4bc8)
    #2 0x7f8472107466 in call_init
/usr/src/debug/glibc-2.42-16.fc43.x86_64/elf/dl-init.c:74
    #3 0x7f8472107466 in call_init
/usr/src/debug/glibc-2.42-16.fc43.x86_64/elf/dl-init.c:26
    #4 0x7f847210753c in _dl_init
/usr/src/debug/glibc-2.42-16.fc43.x86_64/elf/dl-init.c:121
    #5 0x7f847211ff9f  (/lib64/ld-linux-x86-64.so.2+0x1df9f) (BuildId:
4f73d28fef1f2b4633eeb736afe20b043ebb6665)

==2962312==HINT: if you don't care about these errors you may set
ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'piecewise_construct' at
/home/jwakely/gcc/17/include/c++/17.0.0/bits/stl_pair.h:82:53 in /tmp/demo
==2962312==ABORTING


The library declares it as an inline variable, so this isn't a library bug.

Reply via email to