[PATCH] D47165: [PATCH] sanitizer: Don't intercept ustat for Linux
H.J Lu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 21 15:29:49 PDT 2018
hjl.tools created this revision.
hjl.tools added a reviewer: kcc.
Herald added subscribers: Sanitizers, llvm-commits, kubamracek, srhines.
<sys/ustat.h> has been removed from glibc 2.28 by:
commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7
Author: Adhemerval Zanella <adhemerval.zanella at linaro.org>
Date: Sun Mar 18 11:28:59 2018 +0800
Deprecate ustat syscall interface
This patch removes its reference from libsanitizer for Linux to fix
https://bugs.llvm.org/show_bug.cgi?id=37418
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D47165
Files:
lib/sanitizer_common/sanitizer_common_syscalls.inc
lib/sanitizer_common/sanitizer_platform_limits_posix.cc
Index: lib/sanitizer_common/sanitizer_platform_limits_posix.cc
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -159,7 +159,6 @@
# include <sys/procfs.h>
#endif
#include <sys/user.h>
-#include <sys/ustat.h>
#include <linux/cyclades.h>
#include <linux/if_eql.h>
#include <linux/if_plip.h>
@@ -253,7 +252,6 @@
#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
#if SANITIZER_LINUX && !SANITIZER_ANDROID
- unsigned struct_ustat_sz = sizeof(struct ustat);
unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
Index: lib/sanitizer_common/sanitizer_common_syscalls.inc
===================================================================
--- lib/sanitizer_common/sanitizer_common_syscalls.inc
+++ lib/sanitizer_common/sanitizer_common_syscalls.inc
@@ -923,7 +923,7 @@
}
}
-#if !SANITIZER_ANDROID
+#if !SANITIZER_LINUX && !SANITIZER_ANDROID
PRE_SYSCALL(ustat)(long dev, void *ubuf) {}
POST_SYSCALL(ustat)(long res, long dev, void *ubuf) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47165.147890.patch
Type: text/x-patch
Size: 1204 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180521/92fb535d/attachment.bin>
More information about the llvm-commits
mailing list