[all-commits] [llvm/llvm-project] 1cd92e: Bug where insn-based unwind plans on arm64 could b...

Jason Molenda via All-commits all-commits at lists.llvm.org
Tue Apr 14 16:58:06 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1cd92e480c12c03ab9a381b29e4e3964892afa01
      https://github.com/llvm/llvm-project/commit/1cd92e480c12c03ab9a381b29e4e3964892afa01
  Author: Jason Molenda <jason at molenda.com>
  Date:   2020-04-14 (Tue, 14 Apr 2020)

  Changed paths:
    M lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
    M lldb/unittests/UnwindAssembly/ARM64/TestArm64InstEmulation.cpp

  Log Message:
  -----------
  Bug where insn-based unwind plans on arm64 could be wrong

Fix a bug where UnwindAssemblyInstEmulation would confuse which
register is used to compute the Canonical Frame Address after it
had branched over a mid-function epilogue (where the CFA reg changes
from $fp to $sp in the process of epiloguing).  Reinstate the
correct CFA register after we forward the unwind rule for branch
targets.  The failure mode was that UnwindAssemblyInstEmulation
would think CFA was set in terms of $sp after one of these epilogues,
and if it sees modifications to $sp after the branch target, it would
change the CFA offset in the unwind rule -- even though the CFA is
defined in terms of $fp and the $sp changes are irrelevant to correct
calculation.

<rdar://problem/60300528>

Differential Revision: https://reviews.llvm.org/D78077




More information about the All-commits mailing list