Revert "arm: Allow the first function to use linked register as return pc"

This reverts commit f2b3ab5e0a.

Reason for revert: Causes symbolization errors on ARM ChromeOS
devices crbug.com/1182948.

Original change's description:
> arm: Allow the first function to use linked register as return pc
>
> For a crash at the function entry with corrupted PC, the caller's PC
> could be lying in the link register. Using the PC from link register
> would be more effective than blindly scanning the stack immediately.
>
> Change-Id: I51673b7298e70faeeab2bfa97075e3c4793f94bc
> Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2678992
> Reviewed-by: Mike Frysinger <vapier@chromium.org>
> Reviewed-by: Joshua Peraza <jperaza@chromium.org>

Bug: 1182948
Change-Id: I2818b35ab1fb99012919cccc0fb80368e456ca15
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2765164
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Brian Sheedy
2021-03-16 17:39:32 +00:00
committed by Joshua Peraza
parent 8b22babdf8
commit dff7d5afd5
3 changed files with 1 additions and 33 deletions

View File

@@ -82,11 +82,6 @@ class StackwalkerARM : public Stackwalker {
// Return NULL on failure.
StackFrameARM* GetCallerByFramePointer(const vector<StackFrame*>& frames);
// Use the link register if it seems to be a valid function adderss.
// The caller takes ownership of the returned frame. Return NULL on failure.
// This is useful when PC register is corrupted.
StackFrameARM* GetCallerByLinkRegister(const vector<StackFrame*>& frames);
// Scan the stack for plausible return addresses. The caller takes ownership
// of the returned frame. Return NULL on failure.
StackFrameARM* GetCallerByStackScan(const vector<StackFrame*>& frames);