[llvm-commits] [compiler-rt] r172060 - /compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Dmitry Vyukov
dvyukov at google.com
Thu Jan 10 04:28:59 PST 2013
Author: dvyukov
Date: Thu Jan 10 06:28:58 2013
New Revision: 172060
URL: http://llvm.org/viewvc/llvm-project?rev=172060&view=rev
Log:
tsan: add check for invalid fd
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=172060&r1=172059&r2=172060&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Thu Jan 10 06:28:58 2013
@@ -1451,7 +1451,8 @@
FdRelease(thr, pc, epfd);
}
int res = REAL(epoll_ctl)(epfd, op, fd, ev);
- FdAccess(thr, pc, fd);
+ if (fd >= 0)
+ FdAccess(thr, pc, fd);
return res;
}
More information about the llvm-commits
mailing list