]> git.proxmox.com Git - rustc.git/blobdiff - src/libstd/sys/common/unwind/gcc.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / libstd / sys / common / unwind / gcc.rs
index ff6a11951dc5e57f59615394758c2cdedd8fe5bc..da7a340af351525ac6a766722b9d921b7295d66d 100644 (file)
@@ -224,8 +224,13 @@ pub mod eabi {
         context: *mut uw::_Unwind_Context
     ) -> uw::_Unwind_Reason_Code
     {
+        // Backtraces on ARM will call the personality routine with
+        // state == _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND. In those cases
+        // we want to continue unwinding the stack, otherwise all our backtraces
+        // would end at __rust_try.
         if (state as c_int & uw::_US_ACTION_MASK as c_int)
-                           == uw::_US_VIRTUAL_UNWIND_FRAME as c_int { // search phase
+                           == uw::_US_VIRTUAL_UNWIND_FRAME as c_int
+               && (state as c_int & uw::_US_FORCE_UNWIND as c_int) == 0 { // search phase
             uw::_URC_HANDLER_FOUND // catch!
         }
         else { // cleanup phase