[all-commits] [llvm/llvm-project] f178a0: [libunwind] Fix unwind_leaffunction test

PiJoules via All-commits all-commits at lists.llvm.org
Fri Dec 3 11:21:47 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f178a05f220403f2a9d73c7640bfcc7dc2d7be72
  Author: Leonard Chan <leonardchan at google.com>
  Date:   2021-12-03 (Fri, 03 Dec 2021)

  Changed paths:
    M libunwind/test/unwind_leaffunction.pass.cpp

  Log Message:
  [libunwind] Fix unwind_leaffunction test

It's possible for this test not to pass if the libc used does not provide
unwind info for raise. We can replace it with __builtin_cast, which can lead
to a SIGTRAP on x86_64 and a SIGILL on aarch64.

Using this alternative, a nop is needed before the __builtin_cast. This is
because libunwind incorrectly decrements pc, which can cause pc to jump into
the previous function and use the incorrect FDE.

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

More information about the All-commits mailing list