Skip to content

-Wclass-memaccess with builtin_tbb and gcc 11 #9020

@vepadulano

Description

@vepadulano

Describe the bug

It looks like the warning reported at https://sft.its.cern.ch/jira/browse/ROOT-10816 is still not solved with gcc 11 and the current builtin_tbb.

$: cmake -GNinja -Dminimal=ON -Dimt=ON -Dbuiltin_tbb=ON $ROOT_HOME
[...]
$: cmake --build . -- -j32
[...]
In file included from ginclude/tbb/tbb.h:48,
                 from /home/vpadulan/Programs/rootproject/root/core/imt/src/TThreadExecutor.cxx:10:
ginclude/tbb/concurrent_hash_map.h: In constructor ‘tbb::interface5::internal::hash_map_base::hash_map_base()’:
ginclude/tbb/concurrent_hash_map.h:131:24: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct tbb::interface5::internal::hash_map_base::bucket’ with no trivial copy-assignment; use value-initialization instead [-Wclass-memaccess]
  131 |             std::memset(my_embedded_segment, 0, sizeof(my_embedded_segment));
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ginclude/tbb/concurrent_hash_map.h:93:16: note: ‘struct tbb::interface5::internal::hash_map_base::bucket’ declared here
   93 |         struct bucket : tbb::internal::no_copy {
      |                ^~~~~~

Setup

Fedora 34
ROOT master@39de75e
gcc 11.2

Additional context

This should be indeed fixed by the current builtin_tbb (2019 U9) for gcc 10 as reported at uxlfoundation/oneTBB#134
But on the TBB repo there are other similar issues that still didn't work with gcc 10.2 and tbb 2020 uxlfoundation/oneTBB#307

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions