[compiler-rt] r195645 - tsan: filter out more bogus fd values
Dmitry Vyukov
dvyukov at google.com
Mon Nov 25 06:53:29 PST 2013
Author: dvyukov
Date: Mon Nov 25 08:53:29 2013
New Revision: 195645
URL: http://llvm.org/viewvc/llvm-project?rev=195645&view=rev
Log:
tsan: filter out more bogus fd values
people do close(sysconf(_SC_OPEN_MAX)) after fork, where _SC_OPEN_MAX=1200000.
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_fd.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_fd.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_fd.cc?rev=195645&r1=195644&r2=195645&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_fd.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_fd.cc Mon Nov 25 08:53:29 2013
@@ -44,7 +44,7 @@ static FdContext fdctx;
static bool bogusfd(int fd) {
// Apparently a bogus fd value.
- return fd < 0 || fd >= (1 << 30);
+ return fd < 0 || fd >= kTableSize;
}
static FdSync *allocsync() {
More information about the llvm-commits
mailing list