[compiler-rt] r201068 - [sanitizer] struct ustat and a bunch of other definitions are missing on Android.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Feb 10 00:00:25 PST 2014
Author: eugenis
Date: Mon Feb 10 02:00:24 2014
New Revision: 201068
URL: http://llvm.org/viewvc/llvm-project?rev=201068&view=rev
Log:
[sanitizer] struct ustat and a bunch of other definitions are missing on Android.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc?rev=201068&r1=201067&r2=201068&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc Mon Feb 10 02:00:24 2014
@@ -920,6 +920,7 @@ POST_SYSCALL(newfstat)(long res, long fd
}
}
+#if !SANITIZER_ANDROID
PRE_SYSCALL(ustat)(long dev, void *ubuf) {}
POST_SYSCALL(ustat)(long res, long dev, void *ubuf) {
@@ -927,6 +928,7 @@ POST_SYSCALL(ustat)(long res, long dev,
if (ubuf) POST_WRITE(ubuf, struct_ustat_sz);
}
}
+#endif // !SANITIZER_ANDROID
PRE_SYSCALL(stat64)(const void *filename, void *statbuf) {
if (filename)
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=201068&r1=201067&r2=201068&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Mon Feb 10 02:00:24 2014
@@ -169,10 +169,10 @@ namespace __sanitizer {
unsigned struct_old_utsname_sz = sizeof(struct old_utsname);
unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname);
unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
- unsigned struct_ustat_sz = sizeof(struct ustat);
#endif // SANITIZER_LINUX
#if SANITIZER_LINUX && !SANITIZER_ANDROID
+ unsigned struct_ustat_sz = sizeof(struct ustat);
unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
unsigned struct_timex_sz = sizeof(struct timex);
unsigned struct_msqid_ds_sz = sizeof(struct msqid_ds);
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h?rev=201068&r1=201067&r2=201068&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h Mon Feb 10 02:00:24 2014
@@ -78,21 +78,17 @@ namespace __sanitizer {
// More fields that vary with the kernel version.
};
- extern unsigned struct_utimbuf_sz;
- extern unsigned struct_new_utsname_sz;
- extern unsigned struct_old_utsname_sz;
- extern unsigned struct_oldold_utsname_sz;
- extern unsigned struct_msqid_ds_sz;
- extern unsigned struct_mq_attr_sz;
- extern unsigned struct_timex_sz;
- extern unsigned struct_ustat_sz;
-
extern unsigned struct_rlimit_sz;
extern unsigned struct_epoll_event_sz;
extern unsigned struct_sysinfo_sz;
extern unsigned struct_timespec_sz;
extern unsigned __user_cap_header_struct_sz;
extern unsigned __user_cap_data_struct_sz;
+ extern unsigned struct_utimbuf_sz;
+ extern unsigned struct_new_utsname_sz;
+ extern unsigned struct_old_utsname_sz;
+ extern unsigned struct_oldold_utsname_sz;
+
const unsigned old_sigset_t_sz = sizeof(unsigned long);
const unsigned struct_kexec_segment_sz = 4 * sizeof(unsigned long);
@@ -134,7 +130,11 @@ namespace __sanitizer {
#endif // SANITIZER_LINUX
#if SANITIZER_LINUX && !SANITIZER_ANDROID
+ extern unsigned struct_ustat_sz;
extern unsigned struct_rlimit64_sz;
+ extern unsigned struct_timex_sz;
+ extern unsigned struct_msqid_ds_sz;
+ extern unsigned struct_mq_attr_sz;
extern unsigned struct_statvfs_sz;
extern unsigned struct_statvfs64_sz;
More information about the llvm-commits
mailing list