[llvm-commits] [compiler-rt] r157988 - in /compiler-rt/trunk/lib: sanitizer_common/sanitizer_win.cc tsan/Makefile.old tsan/rtl/tsan_platform.h tsan/rtl/tsan_platform_linux.cc tsan/rtl/tsan_suppressions.cc tsan/unit_tests/tsan_platform_test.cc
Alexey Samsonov
samsonov at google.com
Tue Jun 5 00:46:32 PDT 2012
Author: samsonov
Date: Tue Jun 5 02:46:31 2012
New Revision: 157988
URL: http://llvm.org/viewvc/llvm-project?rev=157988&view=rev
Log:
[TSan] use __sanitizer::internal_open in TSan run-time
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc
compiler-rt/trunk/lib/tsan/Makefile.old
compiler-rt/trunk/lib/tsan/rtl/tsan_platform.h
compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc
compiler-rt/trunk/lib/tsan/unit_tests/tsan_platform_test.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc?rev=157988&r1=157987&r2=157988&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc Tue Jun 5 02:46:31 2012
@@ -1,4 +1,4 @@
-//===-- sanitizer_win.cc ------------------------------------------------===//
+//===-- sanitizer_win.cc --------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
Modified: compiler-rt/trunk/lib/tsan/Makefile.old
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/Makefile.old?rev=157988&r1=157987&r2=157988&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/Makefile.old (original)
+++ compiler-rt/trunk/lib/tsan/Makefile.old Tue Jun 5 02:46:31 2012
@@ -18,7 +18,7 @@
UNIT_TEST_OBJ=$(patsubst %.cc,%.o,$(UNIT_TEST_SRC))
UNIT_TEST_HDR=$(wildcard rtl/*.h)
-INCLUDES=-Irtl $(GTEST_INCLUDE)
+INCLUDES=-Irtl -I.. $(GTEST_INCLUDE)
all: libtsan test
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_platform.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_platform.h?rev=157988&r1=157987&r2=157988&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform.h Tue Jun 5 02:46:31 2012
@@ -78,7 +78,6 @@
typedef int fd_t;
const fd_t kInvalidFd = -1;
-fd_t internal_open(const char *name, bool write);
void internal_close(fd_t fd);
uptr internal_filesize(fd_t fd); // -1 on error.
uptr internal_read(fd_t fd, void *p, uptr size);
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc?rev=157988&r1=157987&r2=157988&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc Tue Jun 5 02:46:31 2012
@@ -86,12 +86,6 @@
usleep(ms * 1000);
}
-fd_t internal_open(const char *name, bool write) {
- ScopedInRtl in_rtl;
- return syscall(__NR_open, name,
- write ? O_WRONLY | O_CREAT | O_CLOEXEC : O_RDONLY, 0660);
-}
-
void internal_close(fd_t fd) {
ScopedInRtl in_rtl;
syscall(__NR_close, fd);
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc?rev=157988&r1=157987&r2=157988&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc Tue Jun 5 02:46:31 2012
@@ -11,12 +11,15 @@
//
//===----------------------------------------------------------------------===//
+#include "sanitizer_common/sanitizer_libc.h"
#include "tsan_suppressions.h"
#include "tsan_rtl.h"
#include "tsan_flags.h"
#include "tsan_mman.h"
#include "tsan_platform.h"
+using namespace __sanitizer; // NOLINT
+
namespace __tsan {
static Suppression *g_suppressions;
Modified: compiler-rt/trunk/lib/tsan/unit_tests/tsan_platform_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/unit_tests/tsan_platform_test.cc?rev=157988&r1=157987&r2=157988&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/unit_tests/tsan_platform_test.cc (original)
+++ compiler-rt/trunk/lib/tsan/unit_tests/tsan_platform_test.cc Tue Jun 5 02:46:31 2012
@@ -10,9 +10,12 @@
// This file is a part of ThreadSanitizer (TSan), a race detector.
//
//===----------------------------------------------------------------------===//
+#include "sanitizer_common/sanitizer_libc.h"
#include "tsan_platform.h"
#include "gtest/gtest.h"
+using namespace __sanitizer; // NOLINT
+
namespace __tsan {
static void TestThreadInfo(bool main) {
More information about the llvm-commits
mailing list