all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: npostavs@gmail.com, emacs-devel@gnu.org
Subject: Re: Strange code in emacs.c
Date: Wed, 03 Oct 2018 20:42:59 +0300	[thread overview]
Message-ID: <83d0sr2afw.fsf@gnu.org> (raw)
In-Reply-To: <28cf3cf7-8be2-9f6b-711d-bfbd2b625936@cs.ucla.edu> (message from Paul Eggert on Wed, 3 Oct 2018 10:36:35 -0700)

> Cc: emacs-devel@gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> 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, MAX_ALLOCA);
> 
> 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	other threads:[~2018-10-03 17:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 15:15 Strange code in emacs.c Eli Zaretskii
2018-10-03 17:36 ` Paul Eggert
2018-10-03 17:42   ` Eli Zaretskii [this message]
2018-10-03 18:29     ` Paul Eggert
2018-10-03 22:12 ` Noam Postavsky
2018-10-03 22:59   ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83d0sr2afw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.