This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 0e873b51c6 arm/backtrace/unwind: skip unaligned instruction
0e873b51c6 is described below

commit 0e873b51c63d452c08d60a38ce0bc4593d713a1b
Author: chao an <anc...@xiaomi.com>
AuthorDate: Wed Feb 22 12:34:48 2023 +0800

    arm/backtrace/unwind: skip unaligned instruction
    
    Signed-off-by: chao an <anc...@xiaomi.com>
---
 arch/arm/src/common/arm_backtrace_unwind.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/common/arm_backtrace_unwind.c 
b/arch/arm/src/common/arm_backtrace_unwind.c
index 22ea4acd17..2d37573989 100644
--- a/arch/arm/src/common/arm_backtrace_unwind.c
+++ b/arch/arm/src/common/arm_backtrace_unwind.c
@@ -470,7 +470,11 @@ int unwind_frame(struct unwind_frame_s *frame)
 
   /* Check the personality routine */
 
-  if ((*ctrl.insn & 0xff000000) == 0x80000000)
+  if (((uintptr_t)ctrl.insn & 0x3) != 0)
+    {
+      return -1;
+    }
+  else if ((*ctrl.insn & 0xff000000) == 0x80000000)
     {
       ctrl.byte = 2;
       ctrl.entries = 1;

Reply via email to