Ver código fonte

Fix handling of unw_is_signal_frame return value

Stack frames now properly point inside the caller function.
Amanieu d'Antras 3 anos atrás
pai
commit
13eee6674e
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      src/lib.rs

+ 2 - 1
src/lib.rs

@@ -273,7 +273,8 @@ impl<const N: usize> Backtrace<N> {
 
             // Adjust the IP to point within the function symbol. This should
             // only be done if the frame is not a signal frame.
-            if uw::unw_is_signal_frame(cursor) > 0 {
+            let is_signal_frame =  uw::unw_is_signal_frame(cursor) > 0;
+            if !is_signal_frame {
                 ip -= 1;
             }