From: Juanma Barranquero <lekktu@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 4534@emacsbugs.donarmstrong.com
Subject: bug#4534: assertion failure at window.c:grow_mini_window
Date: Sat, 24 Oct 2009 17:37:26 +0200 [thread overview]
Message-ID: <f7ccd24b0910240837h4dd382feva403b642eb383ba3@mail.gmail.com> (raw)
In-Reply-To: <f7ccd24b0910160132s2bbf0fa1mbd7ff4e9064d2d12@mail.gmail.com>
OK, unless someone opposes I'm going to commit the attached patch.
Currently, both grow_mini_window() and shrink_window_lowest_first() do
in fact accept negative deltas, and act accordingly; so, the names are
misleading with respect to the actual behavior, if not the intent, of
both functions. I'm not comfortable with this, but as Martin said he
was going to rewrite the window code after 23.2, it's a short term
situation anyway.
Other than skipping a useless call to window_min_size() when delta <
0, the patch does not change current behavior, so for people building
without -DXASSERTS it should not introduce any new bug. For those
people with -DXASSERTS, the patch in fact avoids an unnecessary
exception and allows Emacs to continue without incident. That means
there's no obvious downside to this change; even assuming there's a
problem with negative deltas in grow_mini_window(), etc., it is better
to let the negative delta go through with the hope that it will cause
a traceable bug. Most people does not have -DXASSERTS, though, and not
such bug has even been reported.
Juanma
2009-10-24 Juanma Barranquero <lekktu@gmail.com>
* window.c (grow_mini_window): Comment out "delta >= 0" assertion.
For delta < 0, skip check that only makes sense when the mini-window
is going to be enlarged. (Bug#4534)
Index: src/window.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/window.c,v
retrieving revision 1.642
diff -u -2 -r1.642 window.c
--- src/window.c 23 Oct 2009 17:52:57 -0000 1.642
+++ src/window.c 24 Oct 2009 15:33:16 -0000
@@ -4649,10 +4649,13 @@
xassert (MINI_WINDOW_P (w));
- xassert (delta >= 0);
+ /* Commenting out the following assertion goes against the stated interface
+ of this function, but it currently does not seem to do anything useful.
+ See discussion of this issue in the thread for bug#4534.
+ xassert (delta >= 0); */
/* Compute how much we can enlarge the mini-window without deleting
other windows. */
root = XWINDOW (FRAME_ROOT_WINDOW (f));
- if (delta)
+ if (delta > 0)
{
int min_height = window_min_size (root, 0, 0, 0, 0);
next prev parent reply other threads:[~2009-10-24 15:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <f7ccd24b0910260305i10204d17hbdbfe72251d740f1@mail.gmail.com>
2009-09-23 3:02 ` bug#4534: assertion failure at window.c:grow_mini_window Juanma Barranquero
2009-09-23 7:28 ` martin rudalics
2009-09-23 9:50 ` Juanma Barranquero
2009-09-23 10:51 ` Juanma Barranquero
2009-09-23 12:21 ` martin rudalics
2009-09-23 13:42 ` Juanma Barranquero
2009-09-24 6:49 ` martin rudalics
2009-09-23 12:21 ` martin rudalics
2009-09-23 13:41 ` Juanma Barranquero
2009-09-24 6:49 ` martin rudalics
2009-09-24 12:58 ` Juanma Barranquero
2009-09-24 15:32 ` martin rudalics
2009-09-24 15:53 ` Juanma Barranquero
2009-09-24 16:10 ` martin rudalics
2009-09-24 16:22 ` Juanma Barranquero
2009-09-24 17:35 ` martin rudalics
2009-09-24 17:45 ` Juanma Barranquero
2009-09-24 22:03 ` Stefan Monnier
2009-09-25 18:02 ` Juanma Barranquero
2009-10-16 8:32 ` Juanma Barranquero
2009-10-24 15:37 ` Juanma Barranquero [this message]
2009-09-24 17:36 ` Stefan Monnier
2009-09-25 8:35 ` Eli Zaretskii
2009-09-25 11:30 ` Juanma Barranquero
2009-09-25 13:14 ` Eli Zaretskii
2009-09-25 14:08 ` Juanma Barranquero
2009-10-26 10:10 ` bug#4534: marked as done (assertion failure at window.c:grow_mini_window) Emacs bug Tracking System
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=f7ccd24b0910240837h4dd382feva403b642eb383ba3@mail.gmail.com \
--to=lekktu@gmail.com \
--cc=4534@emacsbugs.donarmstrong.com \
--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).