[PATCH] tsan: support for linux aio

Evgeniy Stepanov eugenis at google.com
Wed Nov 27 01:13:32 PST 2013



================
Comment at: sanitizer_common/sanitizer_common_syscalls.inc:1318
@@ +1317,3 @@
+      __sanitizer_iovec *iovec = (__sanitizer_iovec*)iocbpp[i]->aio_buf;
+      for (uptr v = 0; v < len; v++)
+        PRE_READ(iovec[i].iov_base, iovec[i].iov_len);
----------------
Are you sure len (which is aio_nbytes) is the number of iovec entries, and not the size of the array in bytes?


================
Comment at: sanitizer_common/sanitizer_platform_limits_linux.cc:73
@@ -72,2 +72,3 @@
 
-COMPILER_CHECK(struct_io_event_sz == sizeof(struct io_event));
+COMPILER_CHECK(sizeof(__sanitizer_io_event) == sizeof(struct io_event));
+CHECK_SIZE_AND_OFFSET(io_event, data);
----------------
Use CHECK_TYPE_SIZE.

================
Comment at: sanitizer_common/sanitizer_platform_limits_posix.h:120
@@ -113,1 +119,3 @@
   const unsigned iocb_cmd_pwrite = 1;
+  const unsigned iocb_cmd_preadv = 7;
+  const unsigned iocb_cmd_pwritev = 8;
----------------
Add compile-time checks for these values.



http://llvm-reviews.chandlerc.com/D2269



More information about the llvm-commits mailing list