<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr">done</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 12, 2012 at 4:08 PM, Alexey Samsonov <span dir="ltr"><<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br><br><div class="gmail_quote">On Wed, Dec 12, 2012 at 3:59 PM, Dmitry Vyukov <span dir="ltr"><<a href="mailto:dvyukov@google.com" target="_blank">dvyukov@google.com</a>></span> wrote:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: dvyukov<br>Date: Wed Dec 12 05:59:30 2012<br>New Revision: <a href="tel:169970" value="+49169970" target="_blank">169970</a><br>
<br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=169970&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=169970&view=rev</a><br>Log:<br>tsan: more precise handling of IO synchronization<br>
<br>Added:<br> compiler-rt/trunk/lib/tsan/lit_tests/fd_dup_norace.cc<br>Modified:<br> compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc<br> compiler-rt/trunk/lib/tsan/rtl/tsan_mman.h<br> compiler-rt/trunk/lib/tsan/rtl/tsan_stat.cc<br>
compiler-rt/trunk/lib/tsan/rtl/tsan_stat.h<br><br>Added: compiler-rt/trunk/lib/tsan/lit_tests/fd_dup_norace.cc<br>URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/fd_dup_norace.cc?rev=169970&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/fd_dup_norace.cc?rev=169970&view=auto</a><br>
==============================================================================<br>--- compiler-rt/trunk/lib/tsan/lit_tests/fd_dup_norace.cc (added)<br>+++ compiler-rt/trunk/lib/tsan/lit_tests/fd_dup_norace.cc Wed Dec 12 05:59:30 2012<br>
@@ -0,0 +1,33 @@<br>+// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s<br>+#include <pthread.h><br>+#include <stdio.h><br>+#include <unistd.h><br>+#include <sys/types.h><br>
+#include <sys/stat.h><br>+#include <fcntl.h><br>+<br>+int fds[2];<br>+<br>+void *Thread1(void *x) {<br>+ char buf;<br>+ read(fds[0], &buf, 1);<br>+ close(fds[0]);<br>+ return 0;<br>+}<br>+<br>+void *Thread2(void *x) {<br>
+ close(fds[1]);<br>+ return 0;<br>+}<br>+<br>+int main() {<br>+ fds[0] = open("/dev/random", O_RDONLY);<br>+ fds[1] = dup2(fds[0], 100);<br>+ pthread_t t[2];<br>+ pthread_create(&t[0], NULL, Thread1, NULL);<br>
+ pthread_create(&t[1], NULL, Thread2, NULL);<br>+ pthread_join(t[0], NULL);<br>+ pthread_join(t[1], NULL);<br>+}<br>+<br>+// CHECK-NOT: WARNING: ThreadSanitizer: data race<br><br>Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=169970&r1=169969&r2=169970&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=169970&r1=169969&r2=169970&view=diff</a><br>
==============================================================================<br>--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)<br>+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Wed Dec 12 05:59:30 2012<br>
@@ -22,6 +22,7 @@<br> #include "tsan_platform.h"<br> #include "tsan_rtl.h"<br> #include "tsan_mman.h"<br>+#include "tsan_fd.h"<br></blockquote><div><br></div></div></div><div>svn add?</div>
<div><div class="h5"><div>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br> using namespace __tsan; // NOLINT<br><br>@@ -54,6 +55,7 @@<br>
extern "C" void _exit(int status);<br> extern "C" int __cxa_atexit(void (*func)(void *arg), void *arg, void *dso);<br> extern "C" int *__errno_location();<br>+extern "C" int fileno(void *stream);<br>
const int PTHREAD_MUTEX_RECURSIVE = 1;<br> const int PTHREAD_MUTEX_RECURSIVE_NP = 1;<br> const int kPthreadAttrSize = 56;<br>@@ -128,10 +130,8 @@<br> SignalContext *ctx = (SignalContext*)thr->signal_ctx;<br> if (ctx == 0 && thr->is_alive) {<br>
ScopedInRtl in_rtl;<br>- ctx = (SignalContext*)internal_alloc(<br>- MBlockSignal, sizeof(*ctx));<br>- MemoryResetRange(thr, 0, (uptr)ctx, sizeof(*ctx));<br>- internal_memset(ctx, 0, sizeof(*ctx));<br>
+ ctx = (SignalContext*)MmapOrDie(sizeof(*ctx), "SignalContext");<br>+ MemoryResetRange(thr, (uptr)&SigCtx, (uptr)ctx, sizeof(*ctx));<br> thr->signal_ctx = ctx;<br> }<br> return ctx;<br>@@ -310,216 +310,6 @@<br>
Die();<br> }<br><br>-enum FdType {<br>- FdGlobal, // Something we don't know about, global sync.<br>- FdNone, // Does not require any sync.<br>- FdFile,<br>- FdSock,<br>- FdPipe,<br>- FdEvent, // see eventfd()<br>
- FdPoll<br>-};<br>-<br>-struct FdDesc {<br>- FdType type;<br>- u64 sync;<br>-};<br>-<br>-struct FdContext {<br>- static const int kMaxFds = 10 * 1024; // Everything else is synced globally.<br>- FdDesc desc[kMaxFds];<br>
- // Addresses used for synchronization.<br>- u64 fdglobal;<br>- u64 fdfile;<br>- u64 fdsock;<br>- u64 fdpipe;<br>- u64 fdpoll;<br>- u64 fdevent;<br>-};<br>-<br>-static FdContext fdctx;<br>-<br>-static void FdInit() {<br>
- fdctx.desc[0].type = FdNone;<br>- fdctx.desc[1].type = FdNone;<br>- fdctx.desc[2].type = FdNone;<br>-}<br>-<br>-static void *FdAddr(int fd) {<br>- if (fd >= FdContext::kMaxFds)<br>- return &fdctx.fdglobal;<br>
- FdDesc *desc = &fdctx.desc[fd];<br>- if (desc->type == FdNone)<br>- return 0;<br>- if (desc->type == FdGlobal)<br>- return &fdctx.fdglobal;<br>- if (desc->type == FdFile)<br>- return &fdctx.fdfile;<br>
- if (desc->type == FdSock)<br>- return &fdctx.fdsock;<br>- if (desc->type == FdPipe)<br>- return &fdctx.fdpipe;<br>- if (desc->type == FdEvent)<br>- return &fdctx.fdevent;<br>- if (desc->type == FdPoll)<br>
- return &fdctx.fdpoll;<br>- CHECK(0);<br>- return 0;<br>-}<br>-<br>-static void FdAcquire(ThreadState *thr, uptr pc, int fd) {<br>- void *addr = FdAddr(fd);<br>- DPrintf("#%d: FdAcquire(%d) -> %p\n", thr->tid, fd, addr);<br>
- if (addr)<br>- Acquire(thr, pc, (uptr)addr);<br>- if (fd < FdContext::kMaxFds)<br>- MemoryRead8Byte(thr, pc, (uptr)&fdctx.desc[fd].sync);<br>-}<br>-<br>-static void FdRelease(ThreadState *thr, uptr pc, int fd) {<br>
- void *addr = FdAddr(fd);<br>- DPrintf("#%d: FdRelease(%d) -> %p\n", thr->tid, fd, addr);<br>- if (addr)<br>- Release(thr, pc, (uptr)addr);<br>- if (fd < FdContext::kMaxFds)<br>- MemoryRead8Byte(thr, pc, (uptr)&fdctx.desc[fd].sync);<br>
-}<br>-<br>-static void FdClose(ThreadState *thr, uptr pc, int fd) {<br>- if (fd >= FdContext::kMaxFds)<br>- return;<br>- FdDesc *desc = &fdctx.desc[fd];<br>- SyncVar *s = CTX()->synctab.GetAndRemove(thr, pc, (uptr)&desc->sync);<br>
- if (s)<br>- DestroyAndFree(s);<br>- // FIXME(dvyukov): change to FdNone once we handle all fd operations.<br>- desc->type = FdGlobal;<br>- // To catch races between fd usage and close.<br>- MemoryWrite8Byte(thr, pc, (uptr)&desc->sync);<br>
- // We need to clear it, because if we do not intercept any call out there<br>- // that creates fd, we will hit false postives.<br>- MemoryResetRange(thr, pc, (uptr)&desc->sync, sizeof(desc->sync));<br>-}<br>
-<br>-static void FdFileCreate(ThreadState *thr, uptr pc, int fd) {<br>- if (fd >= FdContext::kMaxFds)<br>- return;<br>- FdDesc *desc = &fdctx.desc[fd];<br>- desc->type = FdFile;<br>- // To catch races between fd usage and open.<br>
- MemoryRangeImitateWrite(thr, pc, (uptr)&desc->sync, sizeof(desc->sync));<br>-}<br>-<br>-static void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd) {<br>- if (oldfd >= FdContext::kMaxFds || newfd >= FdContext::kMaxFds) {<br>
- if (oldfd < FdContext::kMaxFds) {<br>- // FIXME(dvyukov): here we lose old sync object associated with the fd,<br>- // this can lead to false positives.<br>- FdDesc *odesc = &fdctx.desc[oldfd];<br>
- odesc->type = FdGlobal;<br>- }<br>- if (newfd < FdContext::kMaxFds) {<br>- FdClose(thr, pc, newfd);<br>- FdDesc *ndesc = &fdctx.desc[newfd];<br>- ndesc->type = FdGlobal;<br>- }<br>
- return;<br>- }<br>-<br>- FdClose(thr, pc, newfd);<br>- FdDesc *ndesc = &fdctx.desc[newfd];<br>- ndesc->type = FdFile;<br>- // To catch races between fd usage and open.<br>- MemoryRangeImitateWrite(thr, pc, (uptr)&ndesc->sync, sizeof(ndesc->sync));<br>
-}<br>-<br>-static void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd) {<br>- if (rfd >= FdContext::kMaxFds || wfd >= FdContext::kMaxFds) {<br>- if (rfd < FdContext::kMaxFds) {<br>- FdDesc *rdesc = &fdctx.desc[rfd];<br>
- rdesc->type = FdGlobal;<br>- }<br>- if (wfd < FdContext::kMaxFds) {<br>- FdDesc *wdesc = &fdctx.desc[wfd];<br>- wdesc->type = FdGlobal;<br>- }<br>- return;<br>- }<br>-<br>- FdDesc *rdesc = &fdctx.desc[rfd];<br>
- rdesc->type = FdPipe;<br>- // To catch races between fd usage and open.<br>- MemoryRangeImitateWrite(thr, pc, (uptr)&rdesc->sync, sizeof(rdesc->sync));<br>-<br>- FdDesc *wdesc = &fdctx.desc[wfd];<br>
- wdesc->type = FdPipe;<br>- // To catch races between fd usage and open.<br>- MemoryRangeImitateWrite(thr, pc, (uptr)&wdesc->sync, sizeof(rdesc->sync));<br>-<br>- DPrintf("#%d: FdCreatePipe(%d, %d)\n", thr->tid, rfd, wfd);<br>
-}<br>-<br>-static void FdEventCreate(ThreadState *thr, uptr pc, int fd) {<br>- if (fd >= FdContext::kMaxFds)<br>- return;<br>- FdDesc *desc = &fdctx.desc[fd];<br>- desc->type = FdEvent;<br>- // To catch races between fd usage and open.<br>
- MemoryRangeImitateWrite(thr, pc, (uptr)&desc->sync, sizeof(desc->sync));<br>-}<br>-<br>-static void FdPollCreate(ThreadState *thr, uptr pc, int fd) {<br>- if (fd >= FdContext::kMaxFds)<br>- return;<br>
- FdDesc *desc = &fdctx.desc[fd];<br>- desc->type = FdPoll;<br>- // To catch races between fd usage and open.<br>- MemoryRangeImitateWrite(thr, pc, (uptr)&desc->sync, sizeof(desc->sync));<br>-}<br>-<br>
-static void FdSocketCreate(ThreadState *thr, uptr pc, int fd) {<br>- if (fd >= FdContext::kMaxFds)<br>- return;<br>- FdDesc *desc = &fdctx.desc[fd];<br>- // It can be UDP socket, let's assume they are not used for synchronization.<br>
- desc->type = FdNone;<br>- // To catch races between fd usage and open.<br>- MemoryRangeImitateWrite(thr, pc, (uptr)&desc->sync, sizeof(desc->sync));<br>-}<br>-<br>-static void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) {<br>
- if (fd < FdContext::kMaxFds) {<br>- FdDesc *desc = &fdctx.desc[fd];<br>- desc->type = FdNone;<br>- MemoryRead8Byte(thr, pc, (uptr)&desc->sync);<br>- }<br>- if (newfd < FdContext::kMaxFds) {<br>
- FdDesc *desc = &fdctx.desc[newfd];<br>- desc->type = FdSock;<br>- MemoryWrite8Byte(thr, pc, (uptr)&desc->sync);<br>- }<br>-}<br>-<br>-static void FdSocketConnect(ThreadState *thr, uptr pc, int fd) {<br>
- if (fd >= FdContext::kMaxFds)<br>- return;<br>- FdDesc *desc = &fdctx.desc[fd];<br>- desc->type = FdSock;<br>- MemoryWrite8Byte(thr, pc, (uptr)&desc->sync);<br>-}<br>-<br>-static uptr file2addr(char *path) {<br>
- (void)path;<br>- static u64 addr;<br>- return (uptr)&addr;<br>-}<br>-<br>-static uptr dir2addr(char *path) {<br>- (void)path;<br>- static u64 addr;<br>- return (uptr)&addr;<br>-}<br>-<br> TSAN_INTERCEPTOR(void*, malloc, uptr size) {<br>
void *p = 0;<br> {<br>@@ -850,7 +640,7 @@<br> SignalContext *sctx = thr->signal_ctx;<br> if (sctx) {<br> thr->signal_ctx = 0;<br>- internal_free(sctx);<br>+ UnmapOrDie(sctx, sizeof(*sctx));<br>
}<br> }<br> }<br>@@ -1124,11 +914,13 @@<br> return res;<br> }<br><br>+/*<br> TSAN_INTERCEPTOR(int, pthread_cond_init, void *c, void *a) {<br> SCOPED_TSAN_INTERCEPTOR(pthread_cond_init, c, a);<br> int res = REAL(pthread_cond_init)(c, a);<br>
return res;<br> }<br>+*/<br><br> TSAN_INTERCEPTOR(int, pthread_cond_destroy, void *c) {<br> SCOPED_TSAN_INTERCEPTOR(pthread_cond_destroy, c);<br>@@ -1278,6 +1070,14 @@<br> return fd;<br> }<br><br>+TSAN_INTERCEPTOR(int, open64, const char *name, int flags, int mode) {<br>
+ SCOPED_TSAN_INTERCEPTOR(open64, name, flags, mode);<br>+ int fd = REAL(open64)(name, flags, mode);<br>+ if (fd >= 0)<br>+ FdFileCreate(thr, pc, fd);<br>+ return fd;<br>+}<br>+<br> TSAN_INTERCEPTOR(int, creat, const char *name, int mode) {<br>
SCOPED_TSAN_INTERCEPTOR(creat, name, mode);<br> int fd = REAL(creat)(name, mode);<br>@@ -1286,6 +1086,14 @@<br> return fd;<br> }<br><br>+TSAN_INTERCEPTOR(int, creat64, const char *name, int mode) {<br>+ SCOPED_TSAN_INTERCEPTOR(creat64, name, mode);<br>
+ int fd = REAL(creat64)(name, mode);<br>+ if (fd >= 0)<br>+ FdFileCreate(thr, pc, fd);<br>+ return fd;<br>+}<br>+<br> TSAN_INTERCEPTOR(int, dup, int oldfd) {<br> SCOPED_TSAN_INTERCEPTOR(dup, oldfd);<br> int newfd = REAL(dup)(oldfd);<br>
@@ -1368,10 +1176,18 @@<br><br> TSAN_INTERCEPTOR(int, close, int fd) {<br> SCOPED_TSAN_INTERCEPTOR(close, fd);<br>- FdClose(thr, pc, fd);<br>+ if (fd >= 0)<br>+ FdClose(thr, pc, fd);<br> return REAL(close)(fd);<br>
}<br><br>+TSAN_INTERCEPTOR(int, __close, int fd) {<br>+ SCOPED_TSAN_INTERCEPTOR(__close, fd);<br>+ if (fd >= 0)<br>+ FdClose(thr, pc, fd);<br>+ return REAL(__close)(fd);<br>+}<br>+<br> TSAN_INTERCEPTOR(int, pipe, int *pipefd) {<br>
SCOPED_TSAN_INTERCEPTOR(pipe, pipefd);<br> int res = REAL(pipe)(pipefd);<br>@@ -1502,7 +1318,7 @@<br><br> TSAN_INTERCEPTOR(int, unlink, char *path) {<br> SCOPED_TSAN_INTERCEPTOR(unlink, path);<br>- Release(thr, pc, file2addr(path));<br>
+ Release(thr, pc, File2addr(path));<br> int res = REAL(unlink)(path);<br> return res;<br> }<br>@@ -1510,7 +1326,40 @@<br> TSAN_INTERCEPTOR(void*, fopen, char *path, char *mode) {<br> SCOPED_TSAN_INTERCEPTOR(fopen, path, mode);<br>
void *res = REAL(fopen)(path, mode);<br>- Acquire(thr, pc, file2addr(path));<br>+ Acquire(thr, pc, File2addr(path));<br>+ if (res) {<br>+ int fd = fileno(res);<br>+ if (fd >= 0)<br>+ FdFileCreate(thr, pc, fd);<br>
+ }<br>+ return res;<br>+}<br>+<br>+TSAN_INTERCEPTOR(void*, freopen, char *path, char *mode, void *stream) {<br>+ SCOPED_TSAN_INTERCEPTOR(freopen, path, mode, stream);<br>+ if (stream) {<br>+ int fd = fileno(stream);<br>
+ if (fd >= 0)<br>+ FdClose(thr, pc, fd);<br>+ }<br>+ void *res = REAL(freopen)(path, mode, stream);<br>+ Acquire(thr, pc, File2addr(path));<br>+ if (res) {<br>+ int fd = fileno(res);<br>+ if (fd >= 0)<br>
+ FdFileCreate(thr, pc, fd);<br>+ }<br>+ return res;<br>+}<br>+<br>+TSAN_INTERCEPTOR(int, fclose, void *stream) {<br>+ SCOPED_TSAN_INTERCEPTOR(fclose, stream);<br>+ if (stream) {<br>+ int fd = fileno(stream);<br>
+ if (fd >= 0)<br>+ FdClose(thr, pc, fd);<br>+ }<br>+ int res = REAL(fclose)(stream);<br> return res;<br> }<br><br>@@ -1534,7 +1383,7 @@<br><br> TSAN_INTERCEPTOR(int, rmdir, char *path) {<br> SCOPED_TSAN_INTERCEPTOR(rmdir, path);<br>
- Release(thr, pc, dir2addr(path));<br>+ Release(thr, pc, Dir2addr(path));<br> int res = REAL(rmdir)(path);<br> return res;<br> }<br>@@ -1542,7 +1391,8 @@<br> TSAN_INTERCEPTOR(void*, opendir, char *path) {<br> SCOPED_TSAN_INTERCEPTOR(opendir, path);<br>
void *res = REAL(opendir)(path);<br>- Acquire(thr, pc, dir2addr(path));<br>+ if (res != 0)<br>+ Acquire(thr, pc, Dir2addr(path));<br> return res;<br> }<br><br>@@ -1853,7 +1703,7 @@<br> TSAN_INTERCEPT(pthread_rwlock_timedwrlock);<br>
TSAN_INTERCEPT(pthread_rwlock_unlock);<br><br>- TSAN_INTERCEPT(pthread_cond_init);<br>+ // TSAN_INTERCEPT(pthread_cond_init);<br> TSAN_INTERCEPT(pthread_cond_destroy);<br> TSAN_INTERCEPT(pthread_cond_signal);<br>
TSAN_INTERCEPT(pthread_cond_broadcast);<br>@@ -1875,7 +1725,9 @@<br> TSAN_INTERCEPT(sem_getvalue);<br><br> TSAN_INTERCEPT(open);<br>+ TSAN_INTERCEPT(open64);<br> TSAN_INTERCEPT(creat);<br>+ TSAN_INTERCEPT(creat64);<br>
TSAN_INTERCEPT(dup);<br> TSAN_INTERCEPT(dup2);<br> TSAN_INTERCEPT(dup3);<br>@@ -1907,6 +1759,8 @@<br><br> TSAN_INTERCEPT(unlink);<br> TSAN_INTERCEPT(fopen);<br>+ TSAN_INTERCEPT(freopen);<br>+ TSAN_INTERCEPT(fclose);<br>
TSAN_INTERCEPT(fread);<br> TSAN_INTERCEPT(fwrite);<br> TSAN_INTERCEPT(puts);<br><br>Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_mman.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_mman.h?rev=169970&r1=169969&r2=169970&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_mman.h?rev=169970&r1=169969&r2=169970&view=diff</a><br>
==============================================================================<br>--- compiler-rt/trunk/lib/tsan/rtl/tsan_mman.h (original)<br>+++ compiler-rt/trunk/lib/tsan/rtl/tsan_mman.h Wed Dec 12 05:59:30 2012<br>@@ -59,6 +59,7 @@<br>
MBlockSuppression,<br> MBlockExpectRace,<br> MBlockSignal,<br>+ MBlockFD,<br><br> // This must be the last.<br> MBlockTypeCount<br><br>Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_stat.cc<br>URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_stat.cc?rev=169970&r1=169969&r2=169970&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_stat.cc?rev=169970&r1=169969&r2=169970&view=diff</a><br>
==============================================================================<br>--- compiler-rt/trunk/lib/tsan/rtl/tsan_stat.cc (original)<br>+++ compiler-rt/trunk/lib/tsan/rtl/tsan_stat.cc Wed Dec 12 05:59:30 2012<br>
@@ -182,7 +182,9 @@<br>
name[StatInt_sem_post] = " sem_post ";<br> name[StatInt_sem_getvalue] = " sem_getvalue ";<br> name[StatInt_open] = " open ";<br>
+ name[StatInt_open64] = " open64 ";<br> name[StatInt_creat] = " creat ";<br>+ name[StatInt_creat64] = " creat64 ";<br>
name[StatInt_dup] = " dup ";<br> name[StatInt_dup2] = " dup2 ";<br> name[StatInt_dup3] = " dup3 ";<br>
@@ -194,6 +196,7 @@<br> name[StatInt_epoll_create] = " epoll_create ";<br> name[StatInt_epoll_create1] = " epoll_create1 ";<br> name[StatInt_close] = " close ";<br>
+ name[StatInt___close] = " __close ";<br> name[StatInt_pipe] = " pipe ";<br> name[StatInt_pipe2] = " pipe2 ";<br>
name[StatInt_read] = " read ";<br>@@ -212,6 +215,8 @@<br> name[StatInt_recvmsg] = " recvmsg ";<br> name[StatInt_unlink] = " unlink ";<br>
name[StatInt_fopen] = " fopen ";<br>+ name[StatInt_freopen] = " freopen ";<br>+ name[StatInt_fclose] = " fclose ";<br>
name[StatInt_fread] = " fread ";<br> name[StatInt_fwrite] = " fwrite ";<br> name[StatInt_puts] = " puts ";<br>
<br>Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_stat.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_stat.h?rev=169970&r1=169969&r2=169970&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_stat.h?rev=169970&r1=169969&r2=169970&view=diff</a><br>
==============================================================================<br>--- compiler-rt/trunk/lib/tsan/rtl/tsan_stat.h (original)<br>+++ compiler-rt/trunk/lib/tsan/rtl/tsan_stat.h Wed Dec 12 05:59:30 2012<br>@@ -177,7 +177,9 @@<br>
StatInt_sem_post,<br> StatInt_sem_getvalue,<br> StatInt_open,<br>+ StatInt_open64,<br> StatInt_creat,<br>+ StatInt_creat64,<br> StatInt_dup,<br> StatInt_dup2,<br> StatInt_dup3,<br>@@ -189,6 +191,7 @@<br>
StatInt_epoll_create,<br>
StatInt_epoll_create1,<br> StatInt_close,<br>+ StatInt___close,<br> StatInt_pipe,<br> StatInt_pipe2,<br> StatInt_read,<br>@@ -207,6 +210,8 @@<br> StatInt_recvmsg,<br> StatInt_unlink,<br> StatInt_fopen,<br>
+ StatInt_freopen,<br>+ StatInt_fclose,<br> StatInt_fread,<br> StatInt_fwrite,<br> StatInt_puts,<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br>
<br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
<div><br></div>
</font></span></div>
</blockquote></div><br></div></div>