Skip to content

Commit

Permalink
sh: unwinder: Fix up invalid PC refetch in dwarf unwinder.
Browse files Browse the repository at this point in the history
The dwarf unwinder presently attempts to provide a sane PC value if none
is provided, however the logic is broken and cases where a previous valid
dwarf frame exists along with a bogus PC value can still proceed. This
fixes up the test and prevents the unwinder from blowing up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Nov 6, 2009
1 parent 345e5a7 commit 421b541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/kernel/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ struct dwarf_frame * dwarf_unwind_stack(unsigned long pc,
* NOTE: the return address is guaranteed to be setup by the
* time this function makes its first function call.
*/
if (!pc && !prev)
if (!pc || !prev)
pc = (unsigned long)current_text_addr();

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
Expand Down

0 comments on commit 421b541

Please sign in to comment.