[compiler-rt] r184296 - [sanitizer] Fix struct ifconf definition on Mac and restore the size checks.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Wed Jun 19 06:21:38 PDT 2013
Author: eugenis
Date: Wed Jun 19 08:21:38 2013
New Revision: 184296
URL: http://llvm.org/viewvc/llvm-project?rev=184296&view=rev
Log:
[sanitizer] Fix struct ifconf definition on Mac and restore the size checks.
Modified:
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_platform_limits_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=184296&r1=184295&r2=184296&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 Wed Jun 19 08:21:38 2013
@@ -157,7 +157,6 @@ namespace __sanitizer {
// ioctl arguments
unsigned struct_arpreq_sz = sizeof(struct arpreq);
- unsigned struct_ifconf_sz = sizeof(struct ifconf);
unsigned struct_ifreq_sz = sizeof(struct ifreq);
unsigned struct_termios_sz = sizeof(struct termios);
unsigned struct_winsize_sz = sizeof(struct winsize);
@@ -673,4 +672,9 @@ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len)
CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
+CHECK_TYPE_SIZE(ifconf);
+CHECK_SIZE_AND_OFFSET(ifconf, ifc_len);
+CHECK_SIZE_AND_OFFSET(ifconf, ifc_ifcu);
+
#endif // SANITIZER_LINUX || SANITIZER_MAC
+
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=184296&r1=184295&r2=184296&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 Wed Jun 19 08:21:38 2013
@@ -154,7 +154,11 @@ namespace __sanitizer {
union {
void *ifcu_req;
} ifc_ifcu;
+#if SANITIZER_MAC
+ } __attribute__((packed));
+#else
};
+#endif
extern unsigned struct_arpreq_sz;
extern unsigned struct_ifreq_sz;
More information about the llvm-commits
mailing list