emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] emacs-26 9bf66c6: Don't run FOR_EACH_FRAME when there'


From: martin rudalics
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

> 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 via email to

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