Commit 89ee2374 authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

Mojo: Defeat tail-call optimization in MaybeDumpWithoutCrashing.

Bug: 1003391
Change-Id: I27a60bffbf951c92ed1bcf8ffbafd7e473335f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827379Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700418}
parent aa70882f
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/debug/alias.h"
#include "base/debug/dump_without_crashing.h" #include "base/debug/dump_without_crashing.h"
#include "base/location.h" #include "base/location.h"
#include "base/logging.h" #include "base/logging.h"
...@@ -104,6 +105,11 @@ NOINLINE void MaybeDumpWithoutCrashing(int quota_used) { ...@@ -104,6 +105,11 @@ NOINLINE void MaybeDumpWithoutCrashing(int quota_used) {
// stack has queued up an unreasonable number of messages, namely // stack has queued up an unreasonable number of messages, namely
// |quota_used|. // |quota_used|.
base::debug::DumpWithoutCrashing(); base::debug::DumpWithoutCrashing();
// Defeat tail-call optimization and ensure these two variables are available
// on the stack.
base::debug::Alias(&crash_threshold);
base::debug::Alias(&quota_used);
} }
} // namespace } // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment