This is an archive of the discontinued LLVM Phabricator instance.

tsan: support for linux aio
ClosedPublic

Authored by dvyukov on Nov 26 2013, 4:04 AM.

Details

Reviewers
eugenis
Summary

tsan: support for linux aio

Diff Detail

Event Timeline

These are functions from a non-standard library (libaio). I'm not sure we can intercept them without forcing -laio on every *san program - which is obviously unacceptable.

Note a hack in io_setup syscall handler - please reproduce it in function-level interceptors.

dvyukov updated this revision to Unknown Object (????).Nov 26 2013, 5:45 AM

remove the interceptors, just add tsan instrumentation to syscall interceptors

dvyukov updated this revision to Unknown Object (????).Nov 26 2013, 5:48 AM

remove debug printf

eugenis accepted this revision.Nov 26 2013, 6:03 AM

LGTM with comments

sanitizer_common/sanitizer_common_syscalls.inc
1296

This is not __sanitizer_iocb. It's struct io_event.

1340

sizeof(*iocb)

dvyukov updated this revision to Unknown Object (????).Nov 26 2013, 6:35 AM

addressed the comments, added io_event struct definition

dvyukov updated this revision to Unknown Object (????).Nov 27 2013, 1:01 AM

add support for preadv/pwritev ops

eugenis added inline comments.Nov 27 2013, 1:13 AM
sanitizer_common/sanitizer_common_syscalls.inc
1318

Are you sure len (which is aio_nbytes) is the number of iovec entries, and not the size of the array in bytes?

sanitizer_common/sanitizer_platform_limits_linux.cc
73

Use CHECK_TYPE_SIZE.

sanitizer_common/sanitizer_platform_limits_posix.h
120

Add compile-time checks for these values.

Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r195830.