mirror of
https://git.freebsd.org/ports.git
synced 2025-04-29 01:56:37 -04:00
Software compiled with -fsanitize=address fails to run with the error message "ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD". This commit fixes the issue by ignoring the [vdso] loaded shared library instead of linux-vdso.so. PR: 267751 Reported by: yuri Co-authored-by: Andreas Tobler <andreast@gcc.gnu.org>
13 lines
589 B
C++
13 lines
589 B
C++
--- libsanitizer/asan/asan_thread.cpp.orig 2024-01-12 13:45:52 UTC
|
|
+++ libsanitizer/asan/asan_thread.cpp
|
|
@@ -323,7 +323,9 @@ void AsanThread::ClearShadowForThreadStackAndTLS() {
|
|
if (tls_begin_ != tls_end_) {
|
|
uptr tls_begin_aligned = RoundDownTo(tls_begin_, ASAN_SHADOW_GRANULARITY);
|
|
uptr tls_end_aligned = RoundUpTo(tls_end_, ASAN_SHADOW_GRANULARITY);
|
|
- FastPoisonShadow(tls_begin_aligned, tls_end_aligned - tls_begin_aligned, 0);
|
|
+ FastPoisonShadowPartialRightRedzone(tls_begin_aligned,
|
|
+ tls_end_ - tls_begin_aligned,
|
|
+ tls_end_aligned - tls_end_, 0);
|
|
}
|
|
}
|
|
|