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

Unified Diff: third_party/WebKit/Source/platform/heap/StackFrameDepth.h

Issue 1663823002: If marking system stack is unknown, be more forgiving about stack depths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/StackFrameDepth.h
diff --git a/third_party/WebKit/Source/platform/heap/StackFrameDepth.h b/third_party/WebKit/Source/platform/heap/StackFrameDepth.h
index 35a4dc41539647d9b9e9086ec07362cfff6f5234..184878a6d24b8da293db41804037902c9acfd61a 100644
--- a/third_party/WebKit/Source/platform/heap/StackFrameDepth.h
+++ b/third_party/WebKit/Source/platform/heap/StackFrameDepth.h
@@ -42,6 +42,17 @@ public:
#if ENABLE(ASSERT)
inline static bool isEnabled() { return s_isEnabled; }
+ inline static bool isAcceptableStackUse()
+ {
+ // ASan adds extra stack usage leading to too noisy asserts.
+#if defined(ADDRESS_SANITIZER)
+ return true;
+#else
+ // If a conservative fallback stack size is in effect, use
+ // a larger stack limit so as to avoid false positives.
+ return !s_isEnabled || isSafeToRecurse() || (s_isUsingFallbackStackSize && (s_stackFrameLimit - currentStackFrame()) < 3 * kSafeStackFrameSize);
haraken 2016/02/04 01:31:36 Nit: Slightly clearer: if (s_isUsingFallbackStack
sof 2016/02/04 09:54:32 Done.
+#endif
+ }
#endif
static size_t getUnderestimatedStackSize();
@@ -76,6 +87,7 @@ private:
static uintptr_t s_stackFrameLimit;
#if ENABLE(ASSERT)
static bool s_isEnabled;
+ static bool s_isUsingFallbackStackSize;
#endif
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698