[libcxx-commits] [PATCH] D68387: [libunwind] Adjust libunwind_01.pass.cpp test for ARM EHABI

John Brawn via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 3 06:20:11 PDT 2019


john.brawn created this revision.
john.brawn added reviewers: compnerd, Amanieu.
Herald added subscribers: libcxx-commits, ldionne, christof, kristof.beyls.

ARM EHABI unwinding tables only store the start address of each function, so the last function is assumed to cover the entire address space after it. The test picks an address on the stack assuming that it's in no function, but because of the above it's actually resolved to the last function. Fix this by using address 0 instead.


Repository:
  rUNW libunwind

https://reviews.llvm.org/D68387

Files:
  libunwind/test/libunwind_01.pass.cpp


Index: libunwind/test/libunwind_01.pass.cpp
===================================================================
--- libunwind/test/libunwind_01.pass.cpp
+++ libunwind/test/libunwind_01.pass.cpp
@@ -50,7 +50,7 @@
     abort();
 
   // Set the IP to an address clearly outside any function.
-  unw_set_reg(&cursor, UNW_REG_IP, (unw_word_t)&context);
+  unw_set_reg(&cursor, UNW_REG_IP, (unw_word_t)0);
 
   ret = unw_get_proc_info(&cursor, &info);
   if (ret != UNW_ENOINFO)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68387.222998.patch
Type: text/x-patch
Size: 473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20191003/f3181fa2/attachment-0001.bin>


More information about the libcxx-commits mailing list