[Lldb-commits] [lldb] [lldb/aarch64] Allow unaligned PC addresses below a trap handler (PR #92093)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Tue May 14 15:25:46 PDT 2024


================
@@ -0,0 +1,26 @@
+# REQUIRES: (target-aarch64 || target-arm) && native
+# UNSUPPORTED: system-windows
+
+# RUN: %clang_host %S/Inputs/unaligned-pc-sigbus.c -o %t
+# RUN: %lldb -s %s -o exit %t | FileCheck %s
+
+breakpoint set -n sigbus_handler
+# CHECK: Breakpoint 1: where = {{.*}}`sigbus_handler
+
+run
+# CHECK: thread #1, {{.*}} stop reason = signal SIGBUS
----------------
jasonmolenda wrote:

Yes doing `b sigbus_handler; r` stops with an EXC_BAD_ACCESS without it being delivered to the process. 
`b sigbus_handler; settings set platform.plugin.darwin.ignored-exceptions EXC_BAD_ACCESS; r` will stop when the SIGBUS is delivered.  
`b sigbus_handler; settings set platform.plugin.darwin.ignored-exceptions EXC_BAD_ACCESS; process handle -p true -s false SIGBUS; r` will stop in sigbus_handler.

On macOS we hit the same failure we saw in https://github.com/llvm/llvm-project/pull/91321 where we don't have eh_frame details for _sigtramp so this frameless leaf function that crashed is not discovered when we do the stack walk.  This will need to be xfailed on macOS for the same reason as 91321.  FWIW I filed a little work item on myself to figure out Something That Can Be Done in rdar://128031075 if you want to annotate the xfail.

https://github.com/llvm/llvm-project/pull/92093


More information about the lldb-commits mailing list