unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Paul Eggert <eggert@cs.ucla.edu>,
	 Stefan Monnier <monnier@IRO.UMontreal.CA>,
	emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] emacs-26 9bf66c6: Don't run FOR_EACH_FRAME when there's no frame left (Bug#29961)
Date: Sun, 17 Dec 2017 11:46:33 +0100	[thread overview]
Message-ID: <5A364B09.4020905@gmx.at> (raw)
In-Reply-To: <9d0b9c22-d386-cd0a-3947-a44d58b1ee0e@cs.ucla.edu>

 > The code with undefined behavior is in delete_frame, after its 3rd use
 > of FOR_EACH_FRAME. This loop head is of the form 'FOR_EACH_FRAME
 > (tail, frame1) ...' and the code after the loop assumes that frame1 is
 > initialized, an assumption that is false if Vframe_list is nil.

Sorry for being completely dense but

       eassume (CONSP (Vframe_list));

now means that we can assume that `frame-list' is non-empty.  Isn't that
assumption incorrect in the scenario of the bug we're discussing here?

 >> Neither next_frame nor prev_frame exhibit such behavior IMO.
 >
 > That's right. However, commit 8720f601e715e5f1d41f7cf863a525a1cc1bc12c
 > removed these functions' assertions that frame-list is non-nil, so I
 > thought it wise to resurrect them.

I don't think that these assertions did any good and would remove them
at least on master.

martin



  reply	other threads:[~2017-12-17 10:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171215073120.7671.79446@vcs0.savannah.gnu.org>
     [not found] ` <20171215073122.52703204D3@vcs0.savannah.gnu.org>
2017-12-15 16:23   ` [Emacs-diffs] emacs-26 9bf66c6: Don't run FOR_EACH_FRAME when there's no frame left (Bug#29961) Stefan Monnier
2017-12-15 17:13     ` Paul Eggert
2017-12-15 18:17       ` martin rudalics
2017-12-15 19:09         ` Paul Eggert
2017-12-16  9:42           ` martin rudalics
2017-12-17  0:50             ` Paul Eggert
2017-12-17 10:46               ` martin rudalics [this message]
2017-12-18  0:39                 ` Paul Eggert
2017-12-18  7:26                   ` martin rudalics

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5A364B09.4020905@gmx.at \
    --to=rudalics@gmx.at \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).