[compiler-rt] r208851 - [sanitizer] Remove the definition of xdr_ops.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Thu May 15 00:18:34 PDT 2014
Author: eugenis
Date: Thu May 15 02:18:34 2014
New Revision: 208851
URL: http://llvm.org/viewvc/llvm-project?rev=208851&view=rev
Log:
[sanitizer] Remove the definition of xdr_ops.
User-visible instances of xdr_ops always seem to be allocated statically, and
don't need unpoisoning. Also, it's size differs between platforms.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.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_interceptors.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=208851&r1=208850&r2=208851&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Thu May 15 02:18:34 2014
@@ -3636,7 +3636,6 @@ INTERCEPTOR(void, xdrmem_create, __sanit
COMMON_INTERCEPTOR_ENTER(ctx, xdrmem_create, xdrs, addr, size, op);
REAL(xdrmem_create)(xdrs, addr, size, op);
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, xdrs, sizeof(*xdrs));
- COMMON_INTERCEPTOR_INITIALIZE_RANGE(xdrs->x_ops, sizeof(*xdrs->x_ops));
if (op == __sanitizer_XDR_ENCODE) {
// It's not obvious how much data individual xdr_ routines write.
// Simply unpoison the entire target buffer in advance.
@@ -3649,7 +3648,6 @@ INTERCEPTOR(void, xdrstdio_create, __san
COMMON_INTERCEPTOR_ENTER(ctx, xdrstdio_create, xdrs, file, op);
REAL(xdrstdio_create)(xdrs, file, op);
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, xdrs, sizeof(*xdrs));
- COMMON_INTERCEPTOR_INITIALIZE_RANGE(xdrs->x_ops, sizeof(*xdrs->x_ops));
}
#define XDR_INTERCEPTOR(F, T) \
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=208851&r1=208850&r2=208851&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 Thu May 15 02:18:34 2014
@@ -1127,7 +1127,6 @@ CHECK_SIZE_AND_OFFSET(XDR, x_public);
CHECK_SIZE_AND_OFFSET(XDR, x_private);
CHECK_SIZE_AND_OFFSET(XDR, x_base);
CHECK_SIZE_AND_OFFSET(XDR, x_handy);
-CHECK_TYPE_SIZE(XDR::xdr_ops);
COMPILER_CHECK(__sanitizer_XDR_ENCODE == XDR_ENCODE);
COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
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=208851&r1=208850&r2=208851&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 Thu May 15 02:18:34 2014
@@ -276,17 +276,9 @@ namespace __sanitizer {
#if SANITIZER_LINUX && !SANITIZER_ANDROID
-#if defined(__arm__)
- const unsigned kXDROpsNumFuns = 9;
-#else
- const unsigned kXDROpsNumFuns = 10;
-#endif
-
struct __sanitizer_XDR {
int x_op;
- struct xdr_ops {
- uptr fns[kXDROpsNumFuns];
- } *x_ops;
+ void *x_ops;
uptr x_public;
uptr x_private;
uptr x_base;
More information about the llvm-commits
mailing list