[llvm-commits] [compiler-rt] r159263 - /compiler-rt/trunk/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc
Dmitry Vyukov
dvyukov at google.com
Wed Jun 27 05:48:46 PDT 2012
Author: dvyukov
Date: Wed Jun 27 07:48:46 2012
New Revision: 159263
URL: http://llvm.org/viewvc/llvm-project?rev=159263&view=rev
Log:
tsan: close all file descriptors after fork()
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc?rev=159263&r1=159262&r2=159263&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc Wed Jun 27 07:48:46 2012
@@ -69,6 +69,8 @@
internal_close(outfd[1]);
internal_close(infd[0]);
internal_close(infd[1]);
+ for (int fd = getdtablesize(); fd > 2; fd--)
+ internal_close(fd);
execl("/usr/bin/addr2line", "/usr/bin/addr2line", "-Cfe", m->fullname, 0);
_exit(0);
} else if (pid < 0) {
More information about the llvm-commits
mailing list