Subject: Re: bug#38753: 27.0.60; cl--random-state uncontrolled growth due to bignums

From: Philipp Stephani <[email-masked]>
Date: Sun, 29 Dec 2019 14:48:25 +0100

Am So., 29. Dez. 2019 um 14:33 Uhr schrieb Pip Cet <[email-masked]>:
>
> On Thu, Dec 26, 2019 at 5:13 PM Christopher Wellons
> <[email-masked]> wrote:
> > The cl-random generator was not written for bignums, so it misbehaves in
> > Emacs 27.
>
> Good catch.
>
> I might be wrong, but it looks to me like cl-random and Frandom are
> currently both limited to small integers (< 31 bits and fixnum range,
> respectively) and we don't have a random number generator that will do
> the right thing for
> (random 100000000000000000000000000000000000000000000)
>
> Any idea how easy it would be to fix either of them, or both?

I haven't tried it out, but mpz_urandomm should be what we need. We'd
need to find a replacement for mini-gmp though.