Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libunwind The semantics of DW_CFA_GNU_args_size have...



details:   https://anonhg.NetBSD.org/src/rev/d32f3ce07e4b
branches:  trunk
changeset: 363290:d32f3ce07e4b
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Jul 17 19:01:16 2018 +0000

description:
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.

diffstat:

 sys/lib/libunwind/UnwindCursor.hpp |  3 ---
 sys/lib/libunwind/libunwind.cxx    |  2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 83370627bdbc -r d32f3ce07e4b sys/lib/libunwind/UnwindCursor.hpp
--- a/sys/lib/libunwind/UnwindCursor.hpp        Tue Jul 17 18:58:58 2018 +0000
+++ b/sys/lib/libunwind/UnwindCursor.hpp        Tue Jul 17 19:01:16 2018 +0000
@@ -61,9 +61,6 @@
       this->setInfoBasedOnIPRegister(true);
       if (fUnwindInfoMissing)
         return UNW_STEP_END;
-
-      if (fInfo.extra_args)
-        setSP(getSP() + fInfo.extra_args);
       return UNW_STEP_SUCCESS;
     }
     __builtin_unreachable();
diff -r 83370627bdbc -r d32f3ce07e4b sys/lib/libunwind/libunwind.cxx
--- a/sys/lib/libunwind/libunwind.cxx   Tue Jul 17 18:58:58 2018 +0000
+++ b/sys/lib/libunwind/libunwind.cxx   Tue Jul 17 19:01:16 2018 +0000
@@ -277,6 +277,8 @@
   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) {



Home | Main Index | Thread Index | Old Index