bug-gmp
[Top][All Lists]
Advanced

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

Re: GCD bug?


From: Ken Kahn
Subject: Re: GCD bug?
Date: Mon, 7 Apr 2003 16:32:50 -0700

Sorry about the delay.
ASSERT (usize * GMP_NUMB_BITS >= d);

aborts in bdivmod.c on line 64. usize is 69 and d is 4294967269 (both
decimal).

I'll substitue the C version of submul_1 and report soon.

Thanks for your help with this.

Best,

-ken

----- Original Message -----
From: "Kevin Ryde" <address@hidden>
To: "Ken Kahn" <address@hidden>
Cc: <address@hidden>
Sent: Tuesday, April 01, 2003 3:10 PM
Subject: Re: GCD bug?


> "Ken Kahn" <address@hidden> writes:
> >
> > that it crashes when usize=-1
>
> Well that's definitely wrong, but it's not obvious how that would
> arise.  The gcd loop is supposed to maintain usize>=vsize, and to go
> to the binary finish-up when vsize<=2.
>
> Some of the assertions might help narrow it down.  Edit or add to
> config.h,
>
> #define WANT_ASSERT 1
>
> and recompile everything.  See if you can get the C versions of the
> low level routines too, not the assembler versions, since the latter
> don't have checking.  (Should be as easy as compiling submul_1.c
> instead of submul_1.asm.)
>
> What you'll hope to see is some assertion go off at a nice early
> stage.  It'll do an abort(), which you can catch in the debugger and
> go from there.
>
> --
> All followups to address@hidden please.
>






reply via email to

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