Fix bug where a failure becomes success on x86.

In libunwind, the unw_step function on x86, an error can get changed
into a success. This meant illegal frames were added that didn't really
exist. Even worse, this could cause crashes because these completely
garbage ip addresses were used to try and get another stack frame. This
lead to attempts to access illegal data, and if you get unlucky and the
map for the bad data was valid at one point, and invalid at the point
of unwind, you get a crash.

There is a small similar possibility of a stop unwind becoming a continue
on aarch64.

Bug: 26248094
Change-Id: Ic3fa3136a33c4c099b28005ed0c5234860813150
diff --git a/src/aarch64/Gstep.c b/src/aarch64/Gstep.c
index 3f5e8ad..5833ce2 100644
--- a/src/aarch64/Gstep.c
+++ b/src/aarch64/Gstep.c
@@ -164,7 +164,7 @@
   if (unlikely (ret == -UNW_ESTOPUNWIND))
     return ret;
 
-  if (unlikely (ret < 0))
+  if (unlikely (ret <= 0))
     return 0;
 
   return (c->dwarf.ip == 0) ? 0 : 1;
diff --git a/src/x86/Gstep.c b/src/x86/Gstep.c
index a1368eb..308f220 100644
--- a/src/x86/Gstep.c
+++ b/src/x86/Gstep.c
@@ -130,7 +130,8 @@
       c->dwarf.frame++;
     }
   /* End of ANDROID update. */
-  ret = (c->dwarf.ip == 0) ? 0 : 1;
-  Debug (2, "returning %d\n", ret);
-  return ret;
+  if (unlikely (ret <= 0))
+    return 0;
+
+  return (c->dwarf.ip == 0) ? 0 : 1;
 }