[Top][All Lists]

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

Re: Using the GNU GMP Library for Bignums in Emacs

From: Markus Triska
Subject: Re: Using the GNU GMP Library for Bignums in Emacs
Date: Sat, 21 Apr 2018 18:46:07 +0200
User-agent: Emacs/24.5

"Siraphob (Ben) Phipathananunth" <address@hidden> writes:

> The benefits of linking GNU GMP are clear. It would make it easier to
> extend the math capabilities of Emacs, while making it faster and less
> error-prone. However, the downsides, if any exist, should be discussed
> as well, to gauge whether pursuing such a task would be fruitful.

Using GMP has a significant downside if you run out of memory: There’s
currently no defined way for the allocation functions to recover from an
error such as out of memory, they must *terminate* program execution.

Please see the following page for details:


Thus, situtations where you can currently throw an Emacs error that can
be handled in user code would instead terminate the Emacs process. This
can for example arise from malicious input that involves very large
integers as results (7^7^7^7 etc.), and of course also elsewhere.

Also, it may become hard to stop long GMP calculations, whereas you can
easily stop computations that are written in Elisp. Thus, long GMP
calculations may lead to denial of editing attacks.

All the best,

reply via email to

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