Module Name:    src
Committed By:   joerg
Date:           Tue Jul 17 19:01:16 UTC 2018

Modified Files:
        src/sys/lib/libunwind: UnwindCursor.hpp libunwind.cxx

Log Message:
The semantics of DW_CFA_GNU_args_size have changed subtile over the
years. Adopt the new convention that it is call-site specific and that
it should be applied before moving the IP by personality routines, but
not during normal unwinding. Further discussion can be found in
LLVM's phabricator review D38680.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libunwind/UnwindCursor.hpp
cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libunwind/libunwind.cxx

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libunwind/UnwindCursor.hpp
diff -u src/sys/lib/libunwind/UnwindCursor.hpp:1.3 src/sys/lib/libunwind/UnwindCursor.hpp:1.4
--- src/sys/lib/libunwind/UnwindCursor.hpp:1.3	Mon Apr 28 13:39:23 2014
+++ src/sys/lib/libunwind/UnwindCursor.hpp	Tue Jul 17 19:01:16 2018
@@ -61,9 +61,6 @@ public:
       this->setInfoBasedOnIPRegister(true);
       if (fUnwindInfoMissing)
         return UNW_STEP_END;
-
-      if (fInfo.extra_args)
-        setSP(getSP() + fInfo.extra_args);
       return UNW_STEP_SUCCESS;
     }
     __builtin_unreachable();

Index: src/sys/lib/libunwind/libunwind.cxx
diff -u src/sys/lib/libunwind/libunwind.cxx:1.9 src/sys/lib/libunwind/libunwind.cxx:1.10
--- src/sys/lib/libunwind/libunwind.cxx:1.9	Tue Feb 17 21:02:33 2015
+++ src/sys/lib/libunwind/libunwind.cxx	Tue Jul 17 19:01:16 2018
@@ -277,6 +277,8 @@ void _Unwind_SetIP(struct _Unwind_Contex
   unw_proc_info_t info;
   cursor->getInfo(&info);
   cursor->setInfoBasedOnIPRegister(false);
+  if (info.extra_args)
+    cursor->setSP(cursor->getSP() + info.extra_args);
 }
 
 uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *context) {

Reply via email to