Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: third_party/tcmalloc/vendor/src/stacktrace_x86-inl.h

Issue 9316021: Update the tcmalloc vendor branch to r144 (gperftools 2.0). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Reuploading Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/vendor/src/stacktrace_x86-inl.h
diff --git a/third_party/tcmalloc/vendor/src/stacktrace_x86-inl.h b/third_party/tcmalloc/vendor/src/stacktrace_x86-inl.h
index a140ab6b01754230c745e84d581993ef04f524fb..9d76342a14484c29cb41ffc221e7129cdfdccd47 100644
--- a/third_party/tcmalloc/vendor/src/stacktrace_x86-inl.h
+++ b/third_party/tcmalloc/vendor/src/stacktrace_x86-inl.h
@@ -64,7 +64,7 @@ typedef ucontext ucontext_t;
#include "base/vdso_support.h"
#endif
-#include "google/stacktrace.h"
+#include "gperftools/stacktrace.h"
#if defined(__linux__) && defined(__i386__) && defined(__ELF__) && defined(HAVE_MMAP)
// Count "push %reg" instructions in VDSO __kernel_vsyscall(),
@@ -238,9 +238,14 @@ static void **NextStackFrame(void **old_sp, const void *uc) {
// In the non-strict mode, allow discontiguous stack frames.
// (alternate-signal-stacks for example).
if (new_sp == old_sp) return NULL;
- // And allow frames upto about 1MB.
- if ((new_sp > old_sp)
- && ((uintptr_t)new_sp - (uintptr_t)old_sp > 1000000)) return NULL;
+ if (new_sp > old_sp) {
+ // And allow frames upto about 1MB.
+ const uintptr_t delta = (uintptr_t)new_sp - (uintptr_t)old_sp;
+ const uintptr_t acceptable_delta = 1000000;
+ if (delta > acceptable_delta) {
+ return NULL;
+ }
+ }
}
if ((uintptr_t)new_sp & (sizeof(void *) - 1)) return NULL;
#ifdef __i386__
« no previous file with comments | « third_party/tcmalloc/vendor/src/stacktrace_win32-inl.h ('k') | third_party/tcmalloc/vendor/src/stacktrace_x86_64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698