mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-27 09:45:27 +01:00
Sanity check frame pointer while stackwalking
BUG= Change-Id: Ib9b0fd5ba7f829f8be8cf856ab371c6540279ee5 Reviewed-on: https://chromium-review.googlesource.com/458526 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
parent
124035f4fb
commit
6cfdde4b91
2 changed files with 8 additions and 1 deletions
|
|
@ -215,6 +215,12 @@ StackFrameAMD64* StackwalkerAMD64::GetCallerByFramePointerRecovery(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Sanity check that resulting rbp is still inside stack memory.
|
||||
uint64_t unused;
|
||||
if (!memory_->GetMemoryAtAddress(caller_rbp, &unused)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
StackFrameAMD64* frame = new StackFrameAMD64();
|
||||
frame->trust = StackFrame::FRAME_TRUST_FP;
|
||||
frame->context = last_frame->context;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue