On Jan 5, 7:11 pm, Bill Hart <[email protected]> wrote:
> I doubt it. In the test code you have:
>
> ASSERT_ALWAYS (putc ((size >> (j*8)) & 0xFF, fp) != EOF);
>
> should that 0xFF be 0xFFLL or something like that on Windows?
I found the bug - its in lines 80-82 in inp_raw.c
if (sizeof (csize) > 4 && csize & 0x80000000L)
csize -= 0x80000000L << 1;
This is intended to sign extend csize if it is longer than 4 bytes.
But the constant is a 32-bit value so shifting it left 1 is makes it
zero.
So the sign extension fails. It needs to be coerced to an mp_size_t
before shifting and then OR'd in (or equivalent):
if (sizeof (csize) > 4 && csize & 0x80000000L)
csize |= ((mp_size_t)0x80000000l) < 1
Brian
--
You received this message because you are subscribed to the Google Groups
"mpir-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/mpir-devel?hl=en.