Open ccotter opened 2 months ago
@vitalybuka thoughts on adding ASAN/MSAN (via sanitizer_common_interceptors) interceptors for pthread APIs like pthread_mutex_lock?
LGTM if expect number of detection is significant. Interceptors have performance and maintenance cost.
Thanks! I'll see what APIs make most sense to include.
The other motive would be to tie into https://discourse.llvm.org/t/rfc-tsan-implementing-a-fuzz-scheduler-for-tsan/80969/4
Common pthread APIs like
pthread_mutex_lock
do not seem to have ASAN or MSAN interceptors. The following program is not caught by ASAN, though it is caught by TSAN with aThreadSanitizer: heap-use-after-free
diagnostic.ASAN and MSAN intercept other libc names and check for the validity of the input parameters. Are the pthread APIs intentionally left out , or should they be added to
sanitizer_common_interceptors.inc
to catch such errors.Stack use after free are not caught by any of the sanitizers.