Fix a Breakpad crash during teardown when USE_PROTECTED_ALLOCATIONS is in

effect.

BUG=none
TEST=Apple Crash Reporter logs from processes in which Breakpad handles the
     crash should point the finger at the actual crash source, not the
     Breakpad thread's attempt to write to unwritable memory.
Review URL: http://breakpad.appspot.com/301001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@828 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
mark@chromium.org 2011-08-26 22:29:33 +00:00
parent ce8d2156e8
commit 93257311a1

View file

@ -593,6 +593,14 @@ void *ExceptionHandler::WaitForMessage(void *exception_handler_class) {
self->WriteMinidumpWithException(receive.exception, receive.code[0],
subcode, receive.thread.name, true);
#if USE_PROTECTED_ALLOCATIONS
// This may have become protected again within
// WriteMinidumpWithException, but it needs to be unprotected for
// UninstallHandler.
if(gBreakpadAllocator)
gBreakpadAllocator->Unprotect();
#endif
self->UninstallHandler(true);
#if USE_PROTECTED_ALLOCATIONS