Subject: bug#32463: 27.0.50; (logior -1) => 4611686018427387903

From: Paul Eggert <[email-masked]>
Date: Sun, 19 Aug 2018 03:59:21 -0700

Pip Cet wrote:

> Even if memory isn't exhausted, creating a bignum larger than 16 GB
> (our most-positive-bignum) results in an immediate crash with external
> libgmp (Linux, x86_64), and that appears not to be easy to fix without
> modifying gmp.

Is there a libgmp bug report for this? or is there a reasonable way to 
characterize this arbitrary limitation in libgmp, so that Emacs does not go over 
the limit and crash? I've already put in one limit, and we can tighten that 
limit (or add more checks) if we know what libgmp's limits are.

> That and left shifts are probably the ones to worry about for now.
> Creating a large bignum by repeated multiplication will require at
> least some intermediate bignums, which need to be allocated and copied
> and thus probably alert the user to something going on.

expt does bignums now too, so that's one more point of failure in this area.