Test test_dynamic_link failed on gcc-10 with LTO
envgap__uxlfoundation__oneTBB-935
01 / FAILURE SIGNATURE
As reported upstream
Error:
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
635761449f0ffb0a3536b6c254beafa3046554b1- Manifest
test/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
uxlfoundation/oneTBB #935 · read the original issue
Commit: 6bfd29bde7e9c47bdfc3ae8a1670ea961c95c78c (current master)
g++:
```
Using built-in specs.
COLLECT_GCC=x86_64-alt-linux-g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alt-linux/10/lto-wrapper
Target: x86_64-alt-linux
Configured with: ../configure --host=x86_64-alt-linux --build=x86_64-alt-linux --target=x86_64-alt-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var/lib --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --disable-silent-rules --without-included-gettext --enable-shared --program-suffix=-10 --with-slibdir=/lib64 --with-bugurl=http://bugzilla.altlinux.org --enable-__cxa_atexit --enable-threads=posix --enable-checking=release --with-system-zlib --without-included-gettext --enable-multilib --enable-default-pie --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --with-arch_32=i586 --with-tune_32=generic --with-multilib-list=m64,m32,mx32 --with-gcc-major-version-only --enable-vtable-verify --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --enable-plugin
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 20210703 (ALT Sisyphus 10.3.1-alt2) (GCC)
```
CMake options:
```
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_STANDARD=20 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON ../..
```
Error:
```
# ./gnu_10.3_cxx20_64_relwithdebinfo/test_dynamic_link
terminate called after throwing an instance of 'std::system_error'
what(): Unknown error -1
Aborted (core dumped)
```
``test_dynamic_link`` stacktrace:
```
#0 0x00007fbe698472f1 in raise () from /lib64/libc.so.6
#1 0x00007fbe69830538 in abort () from /lib64/libc.so.6
#2 0x00007fbe69bd2861 in ?? () from /usr/lib64/libstdc++.so.6
#3 0x00007fbe69c00b68 in ?? () from /usr/lib64/libstdc++.so.6
#4 0x00007fbe69c00bd3 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5 0x00007fbe69c00e64 in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6 0x00007fbe69bd55b1 in std::__throw_system_error(int) () from /usr/lib64/libstdc++.so.6
#7 0x0000560a4f665adc in std::call_once<void (&)()> (__once=..., __f=<optimized out>) at /usr/include/c++/10/mutex:737
#8 tbb::detail::r1::init_dynamic_link_data () at /root/onetbb/oneTBB-6bfd29bde7e9c47bdfc3ae8a1670ea961c95c78c/test/../src/tbb/dynamic_link.cpp:331
#9 tbb::detail::r1::static_init_dl_data_t::static_init_dl_data_t (this=<optimized out>)
at /root/onetbb/oneTBB-6bfd29bde7e9c47bdfc3ae8a1670ea961c95c78c/test/../src/tbb/dynamic_link.cpp:341
#10 __static_initialization_and_destruction_0 (__priority=<optimized out>, __initialize_p=<optimized out>)
at /root/onetbb/oneTBB-6bfd29bde7e9c47bdfc3ae8a1670ea961c95c78c/test/../src/tbb/dynamic_link.cpp:343
#11 0x0000560a4f67f745 in __libc_csu_init (argc=1, argv=0x7ffc916f7c78, envp=0x7ffc916f7c88) at elf-init.c:89
#12 0x00007fbe69831dbd in __libc_start_main () from /lib64/libc.so.6
#13 0x0000560a4f665b2a in _start () at ../sysdeps/x86_64/start.S:120
```04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]