undefined behavior in GMP 5.1.2

Marc Glisse marc.glisse at inria.fr
Mon Sep 23 15:30:10 CEST 2013


On Mon, 23 Sep 2013, Niels Möller wrote:

> Marc Glisse <marc.glisse at inria.fr> writes:
>
>> I'll apply it if I don't hear from anyone else.
>
> It would be nice with a comment explaining the problem, i.e., why the
> size of in2i must be restricted.

Yes, I'll add one when I apply the patch.

> I guess the intention is to avoid that
> the mpf exponent gets out of range, or is it something more subtle?

Just that.

Maybe we could restrict the exponent even more (%=32 should be more than 
enough for this reuse test, I don't know if reusing EXPO instead of 32 
makes sense), for the case where mp_exp_t is smaller than long.

-- 
Marc Glisse


More information about the gmp-bugs mailing list