Commit 54b86796 authored by Torne (Richard Coles)'s avatar Torne (Richard Coles) Committed by Commit Bot

Make LOG(FATAL) use IMMEDIATE_CRASH on official builds.

Use IMMEDIATE_CRASH on official builds instead of BreakDebugger in
LOG(CRASH), to try to increase the likelihood that stack unwinding will
work correctly. BreakDebugger isn't guaranteed to have a stack frame and
thus can thwart CFI unwinding.

This matches the behaviour of CHECK() so should be pretty safe.

Bug: 851851
Change-Id: I7bcf8669ee90aa3fe42769e4e4cc841bf1df1b57
Reviewed-on: https://chromium-review.googlesource.com/1147474Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577541}
parent 07b3bf44
......@@ -852,7 +852,11 @@ LogMessage::~LogMessage() {
}
#endif
// Crash the process to generate a dump.
#if defined(OFFICIAL_BUILD) && defined(NDEBUG)
IMMEDIATE_CRASH();
#else
base::debug::BreakDebugger();
#endif
}
}
}
......
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