mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-01-10 21:05:44 +00:00
Issue 35001: Fallback to Thread Context on bad Exception Context
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@418 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
a3043159f3
commit
5f4fa55598
|
@ -608,8 +608,9 @@ bool MinidumpContext::Read(u_int32_t expected_size) {
|
|||
}
|
||||
|
||||
default: {
|
||||
// Unknown context type
|
||||
BPLOG(ERROR) << "MinidumpContext unknown context type " <<
|
||||
// Unknown context type - Don't log as an error yet. Let the
|
||||
// caller work that out.
|
||||
BPLOG(INFO) << "MinidumpContext unknown context type " <<
|
||||
HexString(cpu_type);
|
||||
return false;
|
||||
break;
|
||||
|
@ -2713,8 +2714,10 @@ MinidumpContext* MinidumpException::GetContext() {
|
|||
|
||||
scoped_ptr<MinidumpContext> context(new MinidumpContext(minidump_));
|
||||
|
||||
// Don't log as an error if we can still fall back on th thread's context
|
||||
// (which must be possible if we got his far.)
|
||||
if (!context->Read(exception_.thread_context.data_size)) {
|
||||
BPLOG(ERROR) << "MinidumpException cannot read context";
|
||||
BPLOG(INFO) << "MinidumpException cannot read context";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -169,8 +169,10 @@ ProcessResult MinidumpProcessor::Process(
|
|||
// of the thread's own context. For the crashed thread, the thread's
|
||||
// own context is the state inside the exception handler. Using it
|
||||
// would not result in the expected stack trace from the time of the
|
||||
// crash.
|
||||
context = exception->GetContext();
|
||||
// crash. If the exception context is invalid, however, we fall back
|
||||
// on the thread context.
|
||||
MinidumpContext * ctx = exception->GetContext();
|
||||
context = ctx ? ctx : thread->GetContext();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue