-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[compiler-rt] fix __sanitizer::struct_sock_fprog_sz availability #118762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-compiler-rt-sanitizer Author: David CARLIER (devnexen) ChangesFull diff: https://github.com/llvm/llvm-project/pull/118762.diff 1 Files Affected:
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
index c87d5ef42c9242..e0da2ac4fd303e 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
@@ -491,6 +491,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
unsigned struct_vt_consize_sz = sizeof(struct vt_consize);
unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes);
unsigned struct_vt_stat_sz = sizeof(struct vt_stat);
+ unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
#endif // SANITIZER_LINUX
#if SANITIZER_LINUX
@@ -537,7 +538,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
- unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
# endif // SANITIZER_GLIBC
# if !SANITIZER_ANDROID && !SANITIZER_APPLE
|
@Zentrik would you be able to test this branch ? |
You can test this locally with the following command:git-clang-format --diff 41cde465acfddb44d400b0a53bb57960762312a2 14226a18399fd925fb9f8f8910fa8e30a6433178 --extensions h,inc -- compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h View the diff from clang-format here.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 aaaff56119..85219ad552 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -524,9 +524,9 @@ struct __sanitizer_dirent64 {
// more fields that we don't care about
};
extern unsigned struct_sock_fprog_sz;
-#endif
+# endif
-#if defined(__x86_64__) && !defined(_LP64)
+# if defined(__x86_64__) && !defined(_LP64)
typedef long long __sanitizer_clock_t;
#else
typedef long __sanitizer_clock_t;
|
I'm getting an error
|
nvm, just checked it s not available on musl, fixing ... |
c334462
to
78733ad
Compare
Can you give it a try when you get the chance ? thx. |
Great that worked thanks. |
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just #if SANITIZER_GLIBC
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
android can't be GLIBC
78733ad
to
5f69085
Compare
@@ -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_GLIBC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# if !SANITIZER_ANDROID && SANITIZER_GLIBC | |
# if SANITIZER_GLIBC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With suggestion
5f69085
to
14226a1
Compare
No description provided.