Sfoglia il codice sorgente

Fix handling of unw_is_signal_frame return value

Stack frames now properly point inside the caller function.
Amanieu d'Antras 3 anni fa
parent
commit
13eee6674e
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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;
             }