undefined behavior in GMP 5.1.2

Marc Glisse marc.glisse at inria.fr
Mon Sep 23 07:31:05 CEST 2013


On Mon, 23 Sep 2013, Vincent Lefevre wrote:

> On 2013-09-21 11:57:42 +0200, Marc Glisse wrote:
>>>> mul.c:81:31: runtime error: signed integer overflow:
>>>> -5260204364771764878 + -5260204364771764878 cannot be represented in
>>>> type 'long'
>>
>> We don't check for underflow in mpf multiplication, I didn't touch that.
>> People should use mpfr ;-)
>
> Shouldn't the test be removed since it is known to be buggy?

I didn't study the test closely, I was waiting to see if someone had an 
opinion on it.

-- 
Marc Glisse


More information about the gmp-bugs mailing list