[PATCH] D55556: [Sanitizer] Expand FSEEK interception to FreeBSD

David CARLIER via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 11 09:19:40 PST 2018


devnexen updated this revision to Diff 177733.
Herald added a subscriber: fedor.sergeev.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55556/new/

https://reviews.llvm.org/D55556

Files:
  lib/sanitizer_common/sanitizer_platform_interceptors.h
  lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc
  lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
  test/sanitizer_common/TestCases/NetBSD/fseek.cc
  test/sanitizer_common/TestCases/Posix/fseek.cc


Index: test/sanitizer_common/TestCases/Posix/fseek.cc
===================================================================
--- test/sanitizer_common/TestCases/Posix/fseek.cc
+++ test/sanitizer_common/TestCases/Posix/fseek.cc
@@ -1,4 +1,6 @@
 // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
+//
+// UNSUPPORTED: linux, darwin, solaris
 
 #include <assert.h>
 #include <inttypes.h>
Index: lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
+++ lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
@@ -48,6 +48,7 @@
   extern unsigned timeval_sz;
   extern unsigned uid_t_sz;
   extern unsigned gid_t_sz;
+  extern unsigned fpos_t_sz;
   extern unsigned mbstate_t_sz;
   extern unsigned struct_timezone_sz;
   extern unsigned struct_tms_sz;
Index: lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc
+++ lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc
@@ -104,6 +104,7 @@
   unsigned timeval_sz = sizeof(timeval);
   unsigned uid_t_sz = sizeof(uid_t);
   unsigned gid_t_sz = sizeof(gid_t);
+  unsigned fpos_t_sz = sizeof(fpos_t);
   unsigned mbstate_t_sz = sizeof(mbstate_t);
   unsigned sigset_t_sz = sizeof(sigset_t);
   unsigned struct_timezone_sz = sizeof(struct timezone);
Index: lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -539,7 +539,7 @@
 #define SANITIZER_INTERCEPT_MD4 SI_NETBSD
 #define SANITIZER_INTERCEPT_RMD160 SI_NETBSD
 #define SANITIZER_INTERCEPT_MD5 SI_NETBSD
-#define SANITIZER_INTERCEPT_FSEEK SI_NETBSD
+#define SANITIZER_INTERCEPT_FSEEK (SI_NETBSD || SI_FREEBSD)
 #define SANITIZER_INTERCEPT_MD2 SI_NETBSD
 #define SANITIZER_INTERCEPT_SHA2 SI_NETBSD
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55556.177733.patch
Type: text/x-patch
Size: 2070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181211/39ebb13a/attachment.bin>


More information about the llvm-commits mailing list