[llvm-commits] [compiler-rt] r158200 - in /compiler-rt/trunk/lib/tsan: rtl/tsan_defs.h rtl/tsan_flags.cc rtl/tsan_interceptors.cc rtl/tsan_md5.cc rtl/tsan_symbolize_addr2line_linux.cc unit_tests/tsan_platform_test.cc
Alexey Samsonov
samsonov at google.com
Fri Jun 8 06:59:40 PDT 2012
Author: samsonov
Date: Fri Jun 8 08:59:39 2012
New Revision: 158200
URL: http://llvm.org/viewvc/llvm-project?rev=158200&view=rev
Log:
[TSan] s/internal_memset/real_memset
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h
compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc
compiler-rt/trunk/lib/tsan/unit_tests/tsan_platform_test.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h?rev=158200&r1=158199&r2=158200&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_defs.h Fri Jun 8 08:59:39 2012
@@ -134,7 +134,7 @@
return (T)(((u64)p + align - 1) & ~(align - 1));
}
-void internal_memset(void *ptr, int c, uptr size);
+void real_memset(void *ptr, int c, uptr size);
int internal_memcmp(const void *s1, const void *s2, uptr size);
int internal_strncmp(const char *s1, const char *s2, uptr size);
void internal_strcpy(char *s1, const char *s2);
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc?rev=158200&r1=158199&r2=158200&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc Fri Jun 8 08:59:39 2012
@@ -32,7 +32,7 @@
}
void InitializeFlags(Flags *f, const char *env) {
- internal_memset(f, 0, sizeof(*f));
+ real_memset(f, 0, sizeof(*f));
// Default values.
f->enable_annotations = true;
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=158200&r1=158199&r2=158200&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Fri Jun 8 08:59:39 2012
@@ -287,7 +287,7 @@
{
SCOPED_INTERCEPTOR_RAW(calloc, size, n);
p = user_alloc(thr, pc, n * size);
- internal_memset(p, 0, n * size);
+ real_memset(p, 0, n * size);
}
invoke_malloc_hook(p, n * size);
return p;
@@ -1283,7 +1283,7 @@
TSAN_INTERCEPTOR(sighandler_t, signal, int sig, sighandler_t h) {
sigaction_t act = {};
act.sa_handler = h;
- internal_memset(&act.sa_mask, -1, sizeof(act.sa_mask));
+ real_memset(&act.sa_mask, -1, sizeof(act.sa_mask));
act.sa_flags = 0;
sigaction_t old = {};
int res = sigaction(sig, &act, &old);
@@ -1521,7 +1521,7 @@
}
}
-void internal_memset(void *ptr, int c, uptr size) {
+void real_memset(void *ptr, int c, uptr size) {
REAL(memset)(ptr, c, size);
}
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc?rev=158200&r1=158199&r2=158200&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_md5.cc Fri Jun 8 08:59:39 2012
@@ -194,13 +194,13 @@
free = 64 - used;
if (free < 8) {
- internal_memset(&ctx->buffer[used], 0, free);
+ real_memset(&ctx->buffer[used], 0, free);
body(ctx, ctx->buffer, 64);
used = 0;
free = 64;
}
- internal_memset(&ctx->buffer[used], 0, free - 8);
+ real_memset(&ctx->buffer[used], 0, free - 8);
ctx->lo <<= 3;
ctx->buffer[56] = ctx->lo;
@@ -231,7 +231,7 @@
result[14] = ctx->d >> 16;
result[15] = ctx->d >> 24;
- internal_memset(ctx, 0, sizeof(*ctx));
+ real_memset(ctx, 0, sizeof(*ctx));
}
MD5Hash md5_hash(const void *data, uptr size) {
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=158200&r1=158199&r2=158200&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 Fri Jun 8 08:59:39 2012
@@ -147,7 +147,7 @@
static ReportStack *NewFrame(uptr addr) {
ReportStack *ent = (ReportStack*)internal_alloc(MBlockReportStack,
sizeof(ReportStack));
- internal_memset(ent, 0, sizeof(*ent));
+ real_memset(ent, 0, sizeof(*ent));
ent->pc = addr;
return ent;
}
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=158200&r1=158199&r2=158200&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 Fri Jun 8 08:59:39 2012
@@ -79,7 +79,7 @@
EXPECT_EQ(len1, internal_read(fd, buf, len1));
EXPECT_EQ(0, internal_memcmp(buf, str1, len1));
EXPECT_EQ((char)0, buf[len1 + 1]);
- internal_memset(buf, 0, len1);
+ real_memset(buf, 0, len1);
EXPECT_EQ(len2, internal_read(fd, buf, len2));
EXPECT_EQ(0, internal_memcmp(buf, str2, len2));
internal_close(fd);
More information about the llvm-commits
mailing list