diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-11-01 01:20:39 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-11-01 01:20:39 +0000 |
| commit | 2335879ff185f10449c09445fb6189a578fbac56 (patch) | |
| tree | 30ef0dd05a1243349de905348bda04d31146d4c9 /compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc | |
| parent | 9cd42ec2145e1e8c0e72825f2be8a006814ca883 (diff) | |
| download | bcm5719-llvm-2335879ff185f10449c09445fb6189a578fbac56.tar.gz bcm5719-llvm-2335879ff185f10449c09445fb6189a578fbac56.zip | |
[sanitizer] Enhance io_submti syscall handler.
llvm-svn: 193848
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc index 9d4eb349525..6efad767523 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc @@ -19,6 +19,12 @@ #include "sanitizer_platform.h" #if SANITIZER_LINUX +#include "sanitizer_internal_defs.h" +#include "sanitizer_platform_limits_posix.h" + +// For offsetof -> __builtin_offsetof definition. +#include <stddef.h> + // This header seems to contain the definitions of _kernel_ stat* structs. #include <asm/stat.h> #include <linux/aio_abi.h> @@ -37,9 +43,11 @@ namespace __sanitizer { unsigned struct___old_kernel_stat_sz = sizeof(struct __old_kernel_stat); unsigned struct_kernel_stat_sz = sizeof(struct stat); unsigned struct_io_event_sz = sizeof(struct io_event); - unsigned struct_iocb_sz = sizeof(struct iocb); unsigned struct_statfs64_sz = sizeof(struct statfs64); + unsigned iocb_cmd_pread = IOCB_CMD_PREAD; + unsigned iocb_cmd_pwrite = IOCB_CMD_PWRITE; + #ifndef _LP64 unsigned struct_kernel_stat64_sz = sizeof(struct stat64); #else @@ -51,4 +59,16 @@ namespace __sanitizer { #endif } // namespace __sanitizer +CHECK_TYPE_SIZE(iocb); +CHECK_SIZE_AND_OFFSET(iocb, aio_data); +// Skip aio_key, it's weird. +CHECK_SIZE_AND_OFFSET(iocb, aio_lio_opcode); +CHECK_SIZE_AND_OFFSET(iocb, aio_reqprio); +CHECK_SIZE_AND_OFFSET(iocb, aio_fildes); +CHECK_SIZE_AND_OFFSET(iocb, aio_buf); +CHECK_SIZE_AND_OFFSET(iocb, aio_nbytes); +CHECK_SIZE_AND_OFFSET(iocb, aio_offset); +CHECK_SIZE_AND_OFFSET(iocb, aio_flags); +CHECK_SIZE_AND_OFFSET(iocb, aio_resfd); + #endif // SANITIZER_LINUX |

