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 |
|
9 |
--- libsanitizer/asan/asan_linux.cpp.orig 2022-11-23 11:22:41 UTC |
10 |
+++ libsanitizer/asan/asan_linux.cpp |
11 |
@@ -148,6 +148,12 @@ static int FindFirstDSOCallback(struct dl_phdr_info *i |
12 |
return 0; |
13 |
# endif |
14 |
|
15 |
+# if SANITIZER_FREEBSD |
16 |
+ // Ignore vDSO |
17 |
+ if (internal_strncmp(info->dlpi_name, "[vdso]", sizeof("[vdso]") - 1) == 0) |
18 |
+ return 0; |
19 |
+# endif |
20 |
+ |
21 |
*name = info->dlpi_name; |
22 |
return 1; |
23 |
} |