Skip to content

2022.3.0: Compilation error with gcc 13.3 #1906

@Lastique

Description

@Lastique

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions