| Index: third_party/tcmalloc/chromium/src/stacktrace_x86-inl.h
|
| diff --git a/third_party/tcmalloc/chromium/src/stacktrace_x86-inl.h b/third_party/tcmalloc/chromium/src/stacktrace_x86-inl.h
|
| index 0f8c4de1957768bc6a79c1e678ae3b90002aa264..abbe0a923ccc8b1171b36a03f085e2a3961033ac 100644
|
| --- a/third_party/tcmalloc/chromium/src/stacktrace_x86-inl.h
|
| +++ b/third_party/tcmalloc/chromium/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(KEEP_SHADOW_STACKS)
|
| #include "linux_shadow_stacks.h"
|
| #endif // KEEP_SHADOW_STACKS
|
| @@ -241,9 +241,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__
|
|
|