[llvm-commits] [compiler-rt] r158141 - in /compiler-rt/trunk/lib: asan/asan_linux.cc sanitizer_common/sanitizer_common.h sanitizer_common/sanitizer_linux.cc sanitizer_common/sanitizer_mac.cc sanitizer_common/sanitizer_win.cc
Alexey Samsonov
samsonov at google.com
Thu Jun 7 00:32:00 PDT 2012
Author: samsonov
Date: Thu Jun 7 02:32:00 2012
New Revision: 158141
URL: http://llvm.org/viewvc/llvm-project?rev=158141&view=rev
Log:
[Sanitizer] Fix mac build.
Modified:
compiler-rt/trunk/lib/asan/asan_linux.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc
Modified: compiler-rt/trunk/lib/asan/asan_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_linux.cc?rev=158141&r1=158140&r2=158141&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_linux.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_linux.cc Thu Jun 7 02:32:00 2012
@@ -41,8 +41,6 @@
namespace __asan {
-const uptr kMaxThreadStackSize = 256 * (1 << 20); // 256M
-
void *AsanDoesNotSupportStaticLinkage() {
// This will fail to link with -static.
return &_DYNAMIC; // defined in link.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h?rev=158141&r1=158140&r2=158141&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h Thu Jun 7 02:32:00 2012
@@ -28,7 +28,7 @@
// Threads
int GetPid();
-void GetThreadStackTopAndBottom(bool is_main_thread, uptr *stack_top,
+void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top,
uptr *stack_bottom);
// Memory management
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=158141&r1=158140&r2=158141&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Thu Jun 7 02:32:00 2012
@@ -73,12 +73,12 @@
}
// ----------------- sanitizer_common.h
-void GetThreadStackTopAndBottom(bool is_main_thread, uptr *stack_top,
+void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top,
uptr *stack_bottom) {
static const uptr kMaxThreadStackSize = 256 * (1 << 20); // 256M
CHECK(stack_top);
CHECK(stack_bottom);
- if (is_main_thread) {
+ if (at_initialization) {
// This is the main thread. Libpthread may not be initialized yet.
struct rlimit rl;
CHECK(getrlimit(RLIMIT_STACK, &rl) == 0);
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc?rev=158141&r1=158140&r2=158141&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc Thu Jun 7 02:32:00 2012
@@ -70,14 +70,14 @@
}
// ----------------- sanitizer_common.h
-void GetThreadStackTopAndBottom(bool is_main_thread, uptr *stack_top,
+void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top,
uptr *stack_bottom) {
CHECK(stack_top);
CHECK(stack_bottom);
uptr stacksize = pthread_get_stacksize_np(pthread_self());
void *stackaddr = pthread_get_stackaddr_np(pthread_self());
*stack_top = (uptr)stackaddr;
- *stack_bottom = stack_top_ - stacksize;
+ *stack_bottom = *stack_top - stacksize;
}
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=158141&r1=158140&r2=158141&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc Thu Jun 7 02:32:00 2012
@@ -24,7 +24,7 @@
return GetProcessId(GetCurrentProcess());
}
-void GetThreadStackTopAndBottom(bool is_main_thread, uptr *stack_top,
+void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top,
uptr *stack_bottom) {
CHECK(stack_top);
CHECK(stack_bottom);
More information about the llvm-commits
mailing list