diff options
author | Lorenzo Salvadore <salvadore@FreeBSD.org> | 2024-01-12 14:25:09 +0000 |
---|---|---|
committer | Lorenzo Salvadore <salvadore@FreeBSD.org> | 2024-01-13 08:18:27 +0000 |
commit | 99c1ed39b70e5c82b3d8d0b01eac6e4ab8438693 (patch) | |
tree | 615a10bb376674684849019cea216a06b2f93cfe /lang | |
parent | 9c8633f6b2061d35c78e745fbafb7666357eaa8e (diff) | |
download | ports-99c1ed39b70e5c82b3d8d0b01eac6e4ab8438693.tar.gz ports-99c1ed39b70e5c82b3d8d0b01eac6e4ab8438693.zip |
Diffstat (limited to 'lang')
-rw-r--r-- | lang/gcc14-devel/Makefile | 1 | ||||
-rw-r--r-- | lang/gcc14-devel/files/patch-libsanitizer_asan_asan__linux.cpp | 23 | ||||
-rw-r--r-- | lang/gcc14-devel/files/patch-libsanitizer_asan_asan__thread.cpp | 13 |
3 files changed, 37 insertions, 0 deletions
diff --git a/lang/gcc14-devel/Makefile b/lang/gcc14-devel/Makefile index 8bfc79d7d740..f92cfaef452d 100644 --- a/lang/gcc14-devel/Makefile +++ b/lang/gcc14-devel/Makefile @@ -1,5 +1,6 @@ PORTNAME= gcc PORTVERSION= 14.0.0.s20240107 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= GCC/snapshots/${DIST_VERSION} PKGNAMESUFFIX= ${SUFFIX}-devel diff --git a/lang/gcc14-devel/files/patch-libsanitizer_asan_asan__linux.cpp b/lang/gcc14-devel/files/patch-libsanitizer_asan_asan__linux.cpp new file mode 100644 index 000000000000..f6c16d8730ee --- /dev/null +++ b/lang/gcc14-devel/files/patch-libsanitizer_asan_asan__linux.cpp @@ -0,0 +1,23 @@ +Since the vDSO shared librares on Linux and FreeBSD are called +differently, the initialization order check fails on FreeBSD. +This patch fixes it by ignoring [vdso] instead of linux-vdso.so. + +GCC gets the original file from the LLVM Project, so this patch should +probably be upstreamed directly to the LLVM Project rather than to GCC. + + +--- libsanitizer/asan/asan_linux.cpp.orig 2022-11-23 11:22:41 UTC ++++ libsanitizer/asan/asan_linux.cpp +@@ -148,6 +148,12 @@ static int FindFirstDSOCallback(struct dl_phdr_info *i + return 0; + # endif + ++# if SANITIZER_FREEBSD ++ // Ignore vDSO ++ if (internal_strncmp(info->dlpi_name, "[vdso]", sizeof("[vdso]") - 1) == 0) ++ return 0; ++# endif ++ + *name = info->dlpi_name; + return 1; + } diff --git a/lang/gcc14-devel/files/patch-libsanitizer_asan_asan__thread.cpp b/lang/gcc14-devel/files/patch-libsanitizer_asan_asan__thread.cpp new file mode 100644 index 000000000000..61c0ccf1cd89 --- /dev/null +++ b/lang/gcc14-devel/files/patch-libsanitizer_asan_asan__thread.cpp @@ -0,0 +1,13 @@ +--- 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); + } + } + |