Explorar el Código

Fix handling of unw_is_signal_frame return value

Stack frames now properly point inside the caller function.
Amanieu d'Antras hace 3 años
padre
commit
13eee6674e
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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;
             }