From 1c69c3f46e1cb858bdff7561b9d732b88e425787 Mon Sep 17 00:00:00 2001 From: Alexander Ivanov Date: Fri, 14 Jun 2024 17:04:28 +0300 Subject: [PATCH] Fix global allocator initialization order in test helper (#322) --- src/groups/mwc/mwctst/mwctst_testhelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/groups/mwc/mwctst/mwctst_testhelper.h b/src/groups/mwc/mwctst/mwctst_testhelper.h index fb8c93a67..e2d72b111 100644 --- a/src/groups/mwc/mwctst/mwctst_testhelper.h +++ b/src/groups/mwc/mwctst/mwctst_testhelper.h @@ -607,8 +607,8 @@ /* Global Allocator */ \ /* NOTE: The global allocator has a static storage duration to outlive */ \ /* all static objects using that allocator. */ \ - INIT_METRICS_REGISTRY() \ static bslma::TestAllocator _gblAlloc("global", (s_verbosityLevel >= 4)); \ + INIT_METRICS_REGISTRY() \ bslma::Default::setGlobalAllocator(&_gblAlloc); #ifdef BSLS_PLATFORM_CMP_CLANG