Explorar o código

Fix handling of unw_is_signal_frame return value

Stack frames now properly point inside the caller function.
Amanieu d'Antras %!s(int64=3) %!d(string=hai) anos
pai
achega
13eee6674e
Modificáronse 1 ficheiros con 2 adicións e 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;
             }