-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Dev Platform 2022-04-18, Dev Platform 2022-05-02, Dev Platform 2022-05-16
GCC 12 has added a warning -Winterference-size when these are used without specifying its value. see
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Winterference-size
This is causing a build failure on aarch64 since hardware_constructive_interference_size defaults to 256 on this platform.
we get error
In file included from src/mongo/s/commands/cluster_find_cmd.cpp:39:
src/mongo/db/stats/counters.h:185:47: error: static assertion failed: cache line spill
185 | static_assert(sizeof(decltype(_together)) <= stdx::hardware_constructive_interference_size,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I think the assumption about these defaults are perhaps not right in mongodb, I also opened a gcc bug where there is some discussion around it.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251
perhaps 'struct Together' should be aligned to hardware_constructive_interference_size to promote true sharing and not to CacheAligned which is aligned to hardware_destructive_interference_size
- causes
-
SERVER-66334 Coverity analysis defect 122186: Uninitialized scalar field
- Closed