diff options
author | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-08-26 22:29:33 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-08-26 22:29:33 +0000 |
commit | 93257311a12637bd8528171617cb9845c5abd36c (patch) | |
tree | 26a95fd897761566260c2aab898e7c13016e3999 | |
parent | Add missing (parentehses.) (diff) | |
download | breakpad-93257311a12637bd8528171617cb9845c5abd36c.tar.xz |
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
-rw-r--r-- | src/client/mac/handler/exception_handler.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/mac/handler/exception_handler.cc b/src/client/mac/handler/exception_handler.cc index a6786fa1..d4cd43d5 100644 --- a/src/client/mac/handler/exception_handler.cc +++ b/src/client/mac/handler/exception_handler.cc @@ -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 |