-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
Programmability 2024-11-25
Our vendored version of tcmalloc fails to compile on GCC 14.2.0 against the C++20 standard.
In short, the incompatibility arises due to tcmalloc improperly attempting to initialize a constinit std::atomic<double> with a double literal when the compiler is using the C++20 standard. Compilation succeeds on prior standards because the ABSL_CONST_INIT macro will resolve to empty text when the constinit specifier is not available. When using C++20, constinit becomes available, which causes the macro to resolve to the constinit keyword, and so any variables declared ABSL_CONST_INIT std::atomic<double> and initialized with a double literal result in compile failures.
The reason that initializing a constinit std::atomic<double> with a double literal results in compile failure is that the single-argument constructor for std::atomic<double> is not declared constexpr and internally invokes runtime-dependent behavior.
- is depended on by
-
SERVER-95407 Upgrade GCC to 14.2
- In Progress