[Top][All Lists]

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

Re: Strange code in emacs.c

From: Eli Zaretskii
Subject: Re: Strange code in emacs.c
Date: Wed, 03 Oct 2018 20:42:59 +0300

> Cc: address@hidden
> From: Paul Eggert <address@hidden>
> Date: Wed, 3 Oct 2018 10:36:35 -0700
> > Don't we mean to set emacs_re_safe_alloca like this instead:
> > 
> >        emacs_re_safe_alloca = min (lim - extra, SIZE_MAX) / ratio;
> >        emacs_re_safe_alloca = max (emacs_re_safe_alloca * min_ratio, 
> Yes, that sounds better to me too. Also, that SIZE_MAX should be changed to 
> min 
> (SIZE_MAX, PTRDIFF_MAX) to avoid (unlikely) integer-overflow issues.

OK, will do.

> Should this fix be put into master or into the emacs-26 branch?

It's a bit scary to do this on emacs-26, as the effect is a dramatic
increase in stack usage by regex routines on most platforms.  So I
thought about doing this on master.  But I'm eager to be convinced by
good arguments to the contrary ;-)

reply via email to

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