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: p.stephani2@gmail.com, 27642@debbugs.gnu.org
Subject: bug#27642: 26.0.50; Assertion failure with nested load
Date: Thu, 13 Jul 2017 21:08:25 +0300	[thread overview]
Message-ID: <83lgnsgqg6.fsf@gnu.org> (raw)
In-Reply-To: <b5e7aca7-efe7-b3bf-16e0-1364716b343b@cs.ucla.edu> (message from Paul Eggert on Wed, 12 Jul 2017 14:25:00 -0700)

> Cc: 27642-done@debbugs.gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Wed, 12 Jul 2017 14:25:00 -0700
> 
> On 07/12/2017 07:52 AM, Eli Zaretskii wrote:
> > I guess the safety harness installed by Paul should be improved to
> > support recursive calls to 'load'.  Until then, I installed a
> > temporary work-around, just to let people who build with assertions
> > enabled work in Emacs without crashes in these cases.
> 
> Your fix is not merely a temporary workaround, as it should work even if 
> there are recursive calls with errors. Closing the bug report, and thanks.

Glad I could fix this, but something is still bothering me.

AFAIU, the infile object is used throughout lread.c, and the places
that use it insist on it not being a NULL pointer.  Example:

  DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0,
	 doc: /* Don't use this yourself.  */)
    (void)
  {
    if (!infile)
      error ("get-file-char misused");

Next, my reading of the code is that close_infile_unwind is normally
called whenever Fload returns.  So if there is a recursive call to
Fload, the inner call will clobber the value of infile set by the
outer call, and when the inner call returns, infile will become a NULL
pointer when close_infile_unwind is called.  Doesn't that get in the
way of the outer call, if it then tries to resume its readevalloop?
Or did I miss something?

TIA





  reply	other threads:[~2017-07-13 18:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 15:45 bug#27642: 26.0.50; Assertion failure with nested load Philipp Stephani
2017-07-12 14:52 ` Eli Zaretskii
2017-07-12 21:25   ` Paul Eggert
2017-07-13 18:08     ` Eli Zaretskii [this message]
2017-07-13 18:24       ` Paul Eggert
2017-07-13 19:06         ` Eli Zaretskii

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=83lgnsgqg6.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=27642@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=p.stephani2@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.