@@ -520,6 +520,50 @@ INTERCEPTOR(ssize_t, pwrite64, int fd, const void *buf, size_t count,
520
520
#define RTSAN_MAYBE_INTERCEPT_PWRITE64
521
521
#endif // SANITIZER_INTERCEPT_PWRITE64
522
522
523
+ #if SANITIZER_INTERCEPT_PREADV
524
+ INTERCEPTOR (ssize_t , preadv, int fd, const struct iovec *iov, int count,
525
+ off_t offset) {
526
+ __rtsan_notify_intercepted_call (" preadv" );
527
+ return REAL (preadv)(fd, iov, count, offset);
528
+ }
529
+ #define RTSAN_MAYBE_INTERCEPT_PREADV INTERCEPT_FUNCTION (preadv)
530
+ #else
531
+ #define RTSAN_MAYBE_INTERCEPT_PREADV
532
+ #endif
533
+
534
+ #if SANITIZER_INTERCEPT_PREADV64
535
+ INTERCEPTOR (ssize_t , preadv64, int fd, const struct iovec *iov, int count,
536
+ off_t offset) {
537
+ __rtsan_notify_intercepted_call (" preadv64" );
538
+ return REAL (preadv)(fd, iov, count, offset);
539
+ }
540
+ #define RTSAN_MAYBE_INTERCEPT_PREADV64 INTERCEPT_FUNCTION (preadv64)
541
+ #else
542
+ #define RTSAN_MAYBE_INTERCEPT_PREADV64
543
+ #endif
544
+
545
+ #if SANITIZER_INTERCEPT_PWRITEV
546
+ INTERCEPTOR (ssize_t , pwritev, int fd, const struct iovec *iov, int count,
547
+ off_t offset) {
548
+ __rtsan_notify_intercepted_call (" pwritev" );
549
+ return REAL (pwritev)(fd, iov, count, offset);
550
+ }
551
+ #define RTSAN_MAYBE_INTERCEPT_PWRITEV INTERCEPT_FUNCTION (pwritev)
552
+ #else
553
+ #define RTSAN_MAYBE_INTERCEPT_PWRITEV
554
+ #endif
555
+
556
+ #if SANITIZER_INTERCEPT_PWRITEV64
557
+ INTERCEPTOR (ssize_t , pwritev64, int fd, const struct iovec *iov, int count,
558
+ off_t offset) {
559
+ __rtsan_notify_intercepted_call (" pwritev64" );
560
+ return REAL (pwritev64)(fd, iov, count, offset);
561
+ }
562
+ #define RTSAN_MAYBE_INTERCEPT_PWRITEV64 INTERCEPT_FUNCTION (pwritev64)
563
+ #else
564
+ #define RTSAN_MAYBE_INTERCEPT_PWRITEV64
565
+ #endif
566
+
523
567
INTERCEPTOR (ssize_t , writev, int fd, const struct iovec *iov, int iovcnt) {
524
568
__rtsan_notify_intercepted_call (" writev" );
525
569
return REAL (writev)(fd, iov, iovcnt);
@@ -1265,9 +1309,13 @@ void __rtsan::InitializeInterceptors() {
1265
1309
INTERCEPT_FUNCTION (write);
1266
1310
INTERCEPT_FUNCTION (pread);
1267
1311
RTSAN_MAYBE_INTERCEPT_PREAD64;
1312
+ RTSAN_MAYBE_INTERCEPT_PREADV;
1313
+ RTSAN_MAYBE_INTERCEPT_PREADV64;
1268
1314
INTERCEPT_FUNCTION (readv);
1269
1315
INTERCEPT_FUNCTION (pwrite);
1270
1316
RTSAN_MAYBE_INTERCEPT_PWRITE64;
1317
+ RTSAN_MAYBE_INTERCEPT_PWRITEV;
1318
+ RTSAN_MAYBE_INTERCEPT_PWRITEV64;
1271
1319
INTERCEPT_FUNCTION (writev);
1272
1320
INTERCEPT_FUNCTION (fwrite);
1273
1321
INTERCEPT_FUNCTION (fclose);
0 commit comments