================
@@ -1446,6 +1464,7 @@ TSAN_INTERCEPTOR(int, pthread_mutex_trylock, void *m) {
 #if !SANITIZER_APPLE
 TSAN_INTERCEPTOR(int, pthread_mutex_timedlock, void *m, void *abstime) {
   SCOPED_TSAN_INTERCEPTOR(pthread_mutex_timedlock, m, abstime);
+  GetFuzzingScheduler().MutexCvOp();
   int res = REAL(pthread_mutex_timedlock)(m, abstime);
----------------
firewave wrote:

> It may become messy b/c we would either need to lie in all functions that 
> return current time, or only return EINTR on shorter sleeps. Otherwise some 
> programs may legitimately break.

A bit off-topic. That might be an idea for a separate "ErrnoSanitizer" which 
will intercept functions which provide errno and randomly fail them with an 
error which requires a re-try.

And on a side note the previous author of libxml2 wrote an allocator which 
randomly failed to be able to detect issues which would also be along those 
lines.

https://github.com/llvm/llvm-project/pull/178836
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to