[libunwind] r373628 - [libunwind] Adjust libunwind_01.pass.cpp test for ARM EHABI

John Brawn via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 3 10:01:04 PDT 2019


Author: john.brawn
Date: Thu Oct  3 10:01:04 2019
New Revision: 373628

URL: http://llvm.org/viewvc/llvm-project?rev=373628&view=rev
Log:
[libunwind] Adjust libunwind_01.pass.cpp test for ARM EHABI

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.

Differential Revision: https://reviews.llvm.org/D68387

Modified:
    libunwind/trunk/test/libunwind_01.pass.cpp

Modified: libunwind/trunk/test/libunwind_01.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/test/libunwind_01.pass.cpp?rev=373628&r1=373627&r2=373628&view=diff
==============================================================================
--- libunwind/trunk/test/libunwind_01.pass.cpp (original)
+++ libunwind/trunk/test/libunwind_01.pass.cpp Thu Oct  3 10:01:04 2019
@@ -48,7 +48,7 @@ void test_no_info() {
     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)




More information about the cfe-commits mailing list