Skip to content

Commit 6b93a1f

Browse files
authored
[compiler-rt] fix __sanitizer::struct_sock_fprog_sz availability (#118762)
1 parent 9514a77 commit 6b93a1f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ INTERCEPTOR(int, prctl, int option, unsigned long arg2, unsigned long arg3,
13131313
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, (u64 *)(arg5), sizeof(u64));
13141314
} else if (res != -1 && option == PR_GET_PDEATHSIG) {
13151315
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, (u64 *)(arg2), sizeof(int));
1316-
# if !SANITIZER_ANDROID
1316+
# if SANITIZER_GLIBC
13171317
} else if (res != -1 && option == PR_SET_SECCOMP &&
13181318
arg2 == SECCOMP_MODE_FILTER) {
13191319
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, (u64 *)(arg3), struct_sock_fprog_sz);

compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ struct __sanitizer_dirent64 {
523523
unsigned short d_reclen;
524524
// more fields that we don't care about
525525
};
526+
extern unsigned struct_sock_fprog_sz;
526527
#endif
527528

528529
#if defined(__x86_64__) && !defined(_LP64)
@@ -1076,7 +1077,6 @@ extern unsigned struct_serial_struct_sz;
10761077
extern unsigned struct_sockaddr_ax25_sz;
10771078
extern unsigned struct_unimapdesc_sz;
10781079
extern unsigned struct_unimapinit_sz;
1079-
extern unsigned struct_sock_fprog_sz;
10801080
# endif // SANITIZER_LINUX && !SANITIZER_ANDROID
10811081

10821082
extern const unsigned long __sanitizer_bufsiz;

0 commit comments

Comments
 (0)