View | Details | Raw Unified | Return to bug 267751 | Differences between
and this patch

Collapse All | Expand All

(-)b/lang/gcc11-devel/files/patch-libsanitizer_asan_asan__linux.cpp (-1 / +18 lines)
Added Link Here
0
- 
1
Since the vDSO shared librares on Linux and FreeBSD are called
2
differently, the initialization order check fails on FreeBSD.
3
This patch fixes it by ignoring [vdso] instead of linux-vdso.so.
4
5
GCC gets the original file from the LLVM Project, so this patch should
6
probably be upstreamed directly to the LLVM Project rather than to GCC.
7
8
--- libsanitizer/asan/asan_linux.cpp.orig	2022-11-23 10:52:45 UTC
9
+++ libsanitizer/asan/asan_linux.cpp
10
@@ -135,7 +135,7 @@ static int FindFirstDSOCallback(struct dl_phdr_info *i
11
     return 0;
12
 
13
   // Ignore vDSO
14
-  if (internal_strncmp(info->dlpi_name, "linux-", sizeof("linux-") - 1) == 0)
15
+  if (internal_strncmp(info->dlpi_name, "[vdso]", sizeof("[vdso]") - 1) == 0)
16
     return 0;
17
 
18
 #if SANITIZER_FREEBSD || SANITIZER_NETBSD

Return to bug 267751