summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'third_party')
-rw-r--r--third_party/tcmalloc/chromium/src/windows/port.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/tcmalloc/chromium/src/windows/port.cc b/third_party/tcmalloc/chromium/src/windows/port.cc
index e77468c..44245e1 100644
--- a/third_party/tcmalloc/chromium/src/windows/port.cc
+++ b/third_party/tcmalloc/chromium/src/windows/port.cc
@@ -154,7 +154,8 @@ static void NTAPI on_tls_callback(HINSTANCE h, DWORD dwReason, PVOID pv) {
extern "C" {
// This tells the linker to run these functions.
#pragma data_seg(push, old_seg)
-#pragma data_seg(".CRT$XLB")
+ // Use CRT$XLY instead of CRT$XLB to ensure we're called LATER in sequence.
+#pragma data_seg(".CRT$XLY")
void (NTAPI *p_thread_callback_tcmalloc)(
HINSTANCE h, DWORD dwReason, PVOID pv) = on_tls_callback;
#pragma data_seg(".CRT$XTU")