[libcxx-commits] [PATCH] D77099: Exit unwinding early when at the top of the stack and additional info won't be found.

Sterling Augustine via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 2 11:23:06 PDT 2020


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG71fbd6e40632: Exit unwinding early when at the top of the stack and additional info won't be… (authored by saugustine).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77099/new/

https://reviews.llvm.org/D77099

Files:
  libunwind/src/UnwindCursor.hpp


Index: libunwind/src/UnwindCursor.hpp
===================================================================
--- libunwind/src/UnwindCursor.hpp
+++ libunwind/src/UnwindCursor.hpp
@@ -1848,6 +1848,12 @@
   pc &= (pint_t)~0x1;
 #endif
 
+  // Exit early if at the top of the stack.
+  if (pc == 0) {
+    _unwindInfoMissing = true;
+    return;
+  }
+
   // If the last line of a function is a "throw" the compiler sometimes
   // emits no instructions after the call to __cxa_throw.  This means
   // the return address is actually the start of the next function.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77099.254571.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200402/3bd9cdab/attachment.bin>


More information about the libcxx-commits mailing list