oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

2022.3.0: Compilation error with gcc 13.3

Open Lastique opened this issue 1 month ago • 1 comments

Summary

Compilation on Ubuntu 24.04 with gcc 13.3 fails with the following error:

In file included from /build/tbb/tbb/test/tbb/test_dynamic_link.cpp:65:
/build/tbb/tbb/test/../src/tbb/dynamic_link.cpp: In function 'void DOCTEST_ANON_FUNC_74()':
/build/tbb/tbb/test/../src/tbb/dynamic_link.cpp:465:25: error: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' output may be truncated copying between 0 and 4078 bytes from a string of length 4096 [-Werror=stringop-truncation]
  465 |             std::strncpy( path, ap_data._path, ap_data._len + 1 );
      |                         ^
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors

Full build log:

ubuntu-noble.log

Version

2022.3.0

Environment

Ubuntu 24.04, gcc 13.3.

Lastique avatar Nov 07 '25 15:11 Lastique

There are other warnings further ahead, if compiled with TBB_STRICT=OFF, see the build log:

ubuntu-noble.log

Lastique avatar Nov 07 '25 16:11 Lastique