re PR sanitizer/59009 (libsanitizer merge from upstream r191666 breaks bootstrap on powerpc64-linux and aarch64-linux)

2015-03-23  Christophe Lyon  <christophe.lyon@linaro.org>

	PR sanitizer/59009
	* sanitizer_common/sanitizer_platform_limits_posix.cc: Cherry pick
	upstream r230324.
	* sanitizer_common/sanitizer_platform.h: Likewise.
	* sanitizer_common/sanitizer_common_syscalls.inc: Likewise.

From-SVN: r221593
This commit is contained in:
Christophe Lyon 2015-03-23 13:43:22 +00:00 committed by Christophe Lyon
parent 89d390e57a
commit d886f7cc33
4 changed files with 24 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2015-03-23 Christophe Lyon <christophe.lyon@linaro.org>
PR sanitizer/59009
* sanitizer_common/sanitizer_platform_limits_posix.cc: Cherry pick
upstream r230324.
* sanitizer_common/sanitizer_platform.h: Likewise.
* sanitizer_common/sanitizer_common_syscalls.inc: Likewise.
2015-03-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
* tsan/tsan_rtl_report.cc (ScopedReport::AddThread): Cherry pick

View file

@ -1441,6 +1441,7 @@ PRE_SYSCALL(fchown)(long fd, long user, long group) {}
POST_SYSCALL(fchown)(long res, long fd, long user, long group) {}
#if SANITIZER_USES_UID16_SYSCALLS
PRE_SYSCALL(chown16)(const void *filename, long user, long group) {
if (filename)
PRE_READ(filename,
@ -1550,6 +1551,7 @@ POST_SYSCALL(getgid16)(long res) {}
PRE_SYSCALL(getegid16)() {}
POST_SYSCALL(getegid16)(long res) {}
#endif // SANITIZER_USES_UID16_SYSCALLS
PRE_SYSCALL(utime)(void *filename, void *times) {}

View file

@ -107,6 +107,19 @@
# endif
#endif
// udi16 syscalls can only be used when the following conditions are
// met:
// * target is one of arm32, x86-32, sparc32, sh or m68k
// * libc version is libc5, glibc-2.0, glibc-2.1 or glibc-2.2 to 2.15
// built against > linux-2.2 kernel headers
// Since we don't want to include libc headers here, we check the
// target only.
#if defined(__arm__) || SANITIZER_X32 || defined(__sparc__)
#define SANITIZER_USES_UID16_SYSCALLS 1
#else
#define SANITIZER_USES_UID16_SYSCALLS 0
#endif
#ifdef __mips__
# define SANITIZER_POINTER_FORMAT_LENGTH FIRST_32_SECOND_64(8, 10)
#else

View file

@ -1004,7 +1004,7 @@ CHECK_SIZE_AND_OFFSET(__sysctl_args, newlen);
CHECK_TYPE_SIZE(__kernel_uid_t);
CHECK_TYPE_SIZE(__kernel_gid_t);
#if !defined(__aarch64__)
#if SANITIZER_USES_UID16_SYSCALLS
CHECK_TYPE_SIZE(__kernel_old_uid_t);
CHECK_TYPE_SIZE(__kernel_old_gid_t);
#endif