]> gcc.gnu.org Git - gcc.git/commitdiff
re PR sanitizer/59009 (libsanitizer merge from upstream r191666 breaks bootstrap...
authorChristophe Lyon <christophe.lyon@linaro.org>
Mon, 23 Mar 2015 13:43:22 +0000 (13:43 +0000)
committerChristophe Lyon <clyon@gcc.gnu.org>
Mon, 23 Mar 2015 13:43:22 +0000 (14:43 +0100)
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

libsanitizer/ChangeLog
libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc
libsanitizer/sanitizer_common/sanitizer_platform.h
libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc

index 6086c09c46cdcff48c50c2a9225aed48c3538ae3..282afed1e3379443627be24baa0ee3c5b6ab3223 100644 (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
index 24e1b7ec45294795e7ad38614deb973935064e59..104c27cd5d2c621a499bd67c629679e4f83a6917 100644 (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) {}
 
index 7064b7166b0df10032e1829f5a7d5fe68e699b7a..55bec90b08056657446d23333f42dbad779b8399 100644 (file)
 # 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
index 199a842447a52a7365886894c23ea1e4dd5091f6..4971c4075bce10aa9ecf623a652bb2c052ea2d2b 100644 (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
This page took 0.077332 seconds and 5 git commands to generate.