[compiler-rt] [compiler-rt] fix __sanitizer::struct_sock_fprog_sz availability (PR #118762)
David CARLIER via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 01:35:56 PST 2024
https://github.com/devnexen updated https://github.com/llvm/llvm-project/pull/118762
>From 78733ad3089d1b04c2bc6db2addb6bab6f067c0f Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen at gmail.com>
Date: Thu, 5 Dec 2024 08:41:03 +0000
Subject: [PATCH] [compiler-rt] fix __sanitizer::struct_sock_fprog_sz
availability
---
.../lib/sanitizer_common/sanitizer_common_interceptors.inc | 2 +-
.../lib/sanitizer_common/sanitizer_platform_limits_posix.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
index ba3693dbd11f63..3cdd73f07092dc 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -1313,7 +1313,7 @@ INTERCEPTOR(int, prctl, int option, unsigned long arg2, unsigned long arg3,
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, (u64 *)(arg5), sizeof(u64));
} else if (res != -1 && option == PR_GET_PDEATHSIG) {
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, (u64 *)(arg2), sizeof(int));
-# if !SANITIZER_ANDROID
+# if !SANITIZER_ANDROID && !SANITIZER_MUSL
} else if (res != -1 && option == PR_SET_SECCOMP &&
arg2 == SECCOMP_MODE_FILTER) {
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, (u64 *)(arg3), struct_sock_fprog_sz);
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index 7d98f8e9a9d801..aaaff56119e9aa 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -523,6 +523,7 @@ struct __sanitizer_dirent64 {
unsigned short d_reclen;
// more fields that we don't care about
};
+extern unsigned struct_sock_fprog_sz;
#endif
#if defined(__x86_64__) && !defined(_LP64)
@@ -1076,7 +1077,6 @@ extern unsigned struct_serial_struct_sz;
extern unsigned struct_sockaddr_ax25_sz;
extern unsigned struct_unimapdesc_sz;
extern unsigned struct_unimapinit_sz;
-extern unsigned struct_sock_fprog_sz;
# endif // SANITIZER_LINUX && !SANITIZER_ANDROID
extern const unsigned long __sanitizer_bufsiz;
More information about the llvm-commits
mailing list