From 39dcc5beb77ec138d9a3f3418fea1159efe54e2e Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Sat, 12 Sep 2026 10:36:24 -0400 Subject: [PATCH] Bug 2071588 - Rebase unpoison-thread-stacks patch for clang trunk after the section pragma GNUC guards. r=me --- build/build-clang/unpoison-thread-stacks_clang_24.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/build-clang/unpoison-thread-stacks_clang_24.patch b/build/build-clang/unpoison-thread-stacks_clang_24.patch index ac88fe0449f6..5a289ab341b4 100644 --- a/build/build-clang/unpoison-thread-stacks_clang_24.patch +++ b/build/build-clang/unpoison-thread-stacks_clang_24.patch @@ -13,7 +13,6 @@ variant causes failures in our test suite, so revert the TLS handler in favor of the interceptor approach from the first patch. diff --git a/compiler-rt/lib/asan/asan_win.cpp b/compiler-rt/lib/asan/asan_win.cpp -index c671a2d..4608792 100644 --- a/compiler-rt/lib/asan/asan_win.cpp +++ b/compiler-rt/lib/asan/asan_win.cpp @@ -172,6 +172,14 @@ INTERCEPTOR_WINAPI(void, ExitThread, DWORD dwExitCode) { @@ -42,7 +41,7 @@ index c671a2d..4608792 100644 #ifdef _WIN64 ASAN_INTERCEPT_FUNC(__C_specific_handler); #else -@@ -401,19 +411,6 @@ IN_SECTION(".CRT$XLAB") +@@ -405,21 +415,6 @@ IN_SECTION(".CRT$XLAB") void(NTAPI* __asan_tls_init)(void*, unsigned long, void*) = asan_thread_init; # endif @@ -55,7 +54,9 @@ index c671a2d..4608792 100644 - } -} - --#pragma section(".CRT$XLY", long, read) +-# if !defined(__GNUC__) || defined(__clang__) +-# pragma section(".CRT$XLY", long, read) +-# endif -IN_SECTION(".CRT$XLY") -void(NTAPI* __asan_tls_exit)(void*, unsigned long, void*) = asan_thread_exit; -