bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shred segfault on 64-bit systems


From: Jim Meyering
Subject: shred segfault on 64-bit systems
Date: Sat, 10 Dec 2005 23:13:57 +0100

`make check' was failing, at least on 64-bit systems.

2005-12-10  Jim Meyering  <address@hidden>

        Avoid shred segfault on 64-bit systems.
        * src/rand-isaac.c (isaac_refill): Don't try to negate a
        local of type uint32_t.  Make the local an `int' instead.

Index: src/rand-isaac.c
===================================================================
RCS file: /fetish/cu/src/rand-isaac.c,v
retrieving revision 1.2
diff -u -p -r1.2 rand-isaac.c
--- src/rand-isaac.c    10 Dec 2005 10:18:01 -0000      1.2
+++ src/rand-isaac.c    10 Dec 2005 22:08:17 -0000
@@ -91,7 +91,7 @@ isaac_refill (struct isaac_state *s, uin
   uint32_t a, b;               /* Caches of a and b */
   uint32_t x, y;               /* Temps needed by isaac_step macro */
   uint32_t *m = s->mm; /* Pointer into state array */
-  uint32_t w = s->words;
+  int w = s->words;
 
   a = s->a;
   b = s->b + (++s->c);
@@ -105,6 +105,7 @@ isaac_refill (struct isaac_state *s, uin
       r += 4;
     }
   while ((m += 4) < s->mm + w / 2);
+
   do
     {
       isaac_step (s, a << 13, a, b, m, -w / 2, r);
@@ -114,6 +115,7 @@ isaac_refill (struct isaac_state *s, uin
       r += 4;
     }
   while ((m += 4) < s->mm + w);
+
   s->a = a;
   s->b = b;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]