Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: src/processor/stackwalker_amd64.h

Issue 1408973002: Issue in StackwalkerAMD64::GetCallerByFramePointerRecovery. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Combining IsEndOfStack and rbp checks Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/processor/stackwalker_amd64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/processor/stackwalker_amd64.h
diff --git a/src/processor/stackwalker_amd64.h b/src/processor/stackwalker_amd64.h
index 8f3dbd528024b03e7c91d74548929316d8622810..67c455104832d9353d160ed2fea4d3ea671818a4 100644
--- a/src/processor/stackwalker_amd64.h
+++ b/src/processor/stackwalker_amd64.h
@@ -78,6 +78,14 @@ class StackwalkerAMD64 : public Stackwalker {
StackFrameAMD64* GetCallerByCFIFrameInfo(const vector<StackFrame*> &frames,
CFIFrameInfo* cfi_frame_info);
+ // Checks whether end-of-stack is reached. An instruction address of 0 is an
+ // end-of-stack marker. If the stack pointer of the caller is at a lower
+ // address than the stack pointer of the callee, then that's clearly incorrect
+ // and it is treated as end-of-stack to enforce progress and avoid infinite
+ // loops.
+ bool IsEndOfStack(uint64_t caller_rip, uint64_t caller_rsp,
+ uint64_t callee_rsp);
+
// Assumes a traditional frame layout where the frame pointer has not been
// omitted. The expectation is that caller's %rbp is pushed to the stack
// after the return address of the callee, and that the callee's %rsp can
« no previous file with comments | « no previous file | src/processor/stackwalker_amd64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698