Commit f355c560 authored by cevans@chromium.org's avatar cevans@chromium.org

Make sure the process is _really_ gone after a __debugbreak(). We've had a

few annoying cases where someone has been monitoring Chrome under windbg,
which can skip over __debugbreak() and then show them a scary-looking
access violation.

BUG=NONE
TEST=NONE

Review URL: http://codereview.chromium.org/6372008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72107 0039d316-1c4b-4281-b951-d872f2087c98
parent 20305ec6
......@@ -174,6 +174,9 @@ bool BeingDebugged() {
void BreakDebugger() {
DEBUG_BREAK();
#if defined(NDEBUG)
_exit(1);
#endif
}
} // namespace debug
......
......@@ -105,6 +105,9 @@ void BreakDebugger() {
if (IsDebugUISuppressed())
_exit(1);
__debugbreak();
#if defined(NDEBUG)
_exit(1);
#endif
}
} // namespace debug
......
......@@ -137,10 +137,12 @@ void InvalidParameter(const wchar_t* expression, const wchar_t* function,
const wchar_t* file, unsigned int line,
uintptr_t reserved) {
__debugbreak();
_exit(1);
}
void PureCall() {
__debugbreak();
_exit(1);
}
#pragma warning(push)
......@@ -162,6 +164,7 @@ void OnNoMemory() {
// the buffer is then used, it provides a handy mapping of memory starting at
// address 0 for an attacker to utilize.
__debugbreak();
_exit(1);
}
#pragma warning(pop)
......
......@@ -149,8 +149,10 @@ int PluginMain(const MainFunctionParams& parameters) {
BOOL result = run_security_tests(&test_count);
DCHECK(result) << "Test number " << test_count << " has failed.";
// If we are in release mode, crash or debug the process.
if (!result)
if (!result) {
__debugbreak();
_exit(1);
}
}
FreeLibrary(sandbox_test_module);
......
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