On Wed, Apr 5, 2017 at 11:23 AM, Dave Watson <[email protected]> wrote:
> On 04/04/17 06:16 PM, Paul Pluzhnikov wrote:

>> Attached patch removes the assert, and makes fetch32 (and fetch16)
>> return -UNW_EINVAL instead.
>
> Merged, thanks.

Oops. I've inverted the check. Very sorry about that.
Correction attached.

-- 
Paul Pluzhnikov
diff --git a/include/remote.h b/include/remote.h
index d8daeec..064d630 100644
--- a/include/remote.h
+++ b/include/remote.h
@@ -74,7 +74,7 @@ fetch16 (unw_addr_space_t as, unw_accessors_t *a,
   unw_word_t val, aligned_addr = *addr & -WSIZE, off = *addr - aligned_addr;
   int ret;
 
-  if ((off & 0x1) == 0)
+  if ((off & 0x1) != 0)
     return -UNW_EINVAL;
 
   *addr += 2;
@@ -97,7 +97,7 @@ fetch32 (unw_addr_space_t as, unw_accessors_t *a,
   unw_word_t val, aligned_addr = *addr & -WSIZE, off = *addr - aligned_addr;
   int ret;
 
-  if ((off & 0x3) == 0)
+  if ((off & 0x3) != 0)
     return -UNW_EINVAL;
 
   *addr += 4;
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to