tsan: do not crash when user intercepts fopen()
llvm-svn: 191066
This commit is contained in:
parent
3e9a6d345a
commit
20f6ff1e66
|
|
@ -1751,7 +1751,11 @@ TSAN_INTERCEPTOR(int, getaddrinfo, void *node, void *service,
|
|||
// and can report false race between malloc and free
|
||||
// inside of getaddrinfo. So ignore memory accesses.
|
||||
ThreadIgnoreBegin(thr);
|
||||
// getaddrinfo calls fopen, which can be intercepted by user.
|
||||
thr->in_rtl--;
|
||||
CHECK_EQ(thr->in_rtl, 0);
|
||||
int res = REAL(getaddrinfo)(node, service, hints, rv);
|
||||
thr->in_rtl++;
|
||||
ThreadIgnoreEnd(thr);
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue