From: nljlistbox2@gmail.com (N. Jackson)
To: Eli Zaretskii <eliz@gnu.org>
Cc: 20808@debbugs.gnu.org
Subject: bug#20808: 24.5; Emacs looping with 100% CPU at line 15287 (?) of xdisp.c
Date: Tue, 16 Jun 2015 22:59:51 -0300 [thread overview]
Message-ID: <87d20vhz6w.fsf@moondust.localdomain> (raw)
In-Reply-To: <83vbenn1ad.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 16 Jun 2015 18:03:22 +0300")
At 12:03 -0300 on Tuesday 2015-06-16, Eli Zaretskii wrote:
> Please try the patch below. If it solves the problem, I will install
> it shortly. Please try both an optimized and a non-optimized build, if
> you can afford that.
>
> diff --git a/src/xdisp.c b/src/xdisp.c
> index 7c15330..1e2f1b26 100644
> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -15094,7 +15094,8 @@ enum
> RESTORE_IT (&it, &it, it1data);
> move_it_by_lines (&it, 1);
> SAVE_IT (it1, it, it1data);
> - } while (line_bottom_y (&it1) - start_y < amount_to_scroll);
> + } while (IT_CHARPOS (it) < ZV
> + && line_bottom_y (&it1) - start_y < amount_to_scroll);
> }
>
> /* If STARTP is unchanged, move it down another screen line. */
Short version: I am reasonably confident that the infloop does not occur
with this patch.
Longer version:
I say "reasonably" because I still do not have an exact recipe to
trigger the infloop. It seems to be some interaction with the layout of
the web page, the height of the images and the height of the window. I
was unsuccessful reproducing the problem with C-u 12 M-x
split-window-below and then opening the web page in Eww, possibly
because the height required to reproduce the problem is not exactly 11
(the way Gnus sets the window heights maybe gives a fractional size to
the upper window).
In any case, the infloop is not too hard to trigger by moving around the
window and scrolling. With my own (unoptimised build), in four trials I
was able to trigger the infloop in 5 minutes 16 seconds, 57 seconds, 48
seconds, and 58 seconds from the time I clicked the email link that
opened the offending web page. (The time was less after I got more
aggressive with the interface.) With the Fedora 21 build, in four trials
I triggered the infloop in 2:17, 1:38, 0:49, and 0:43.
With the patch, in my unoptimised build, configured with
./configure --prefix=/home/nlj/local/ --enable-checking='yes,glyphs' CFLAGS="-O0 -g3 -ggdb"
, I was unable to trigger an infloop in over seven and a half minutes of
aggressive interaction with the window displaying the offending web
page.
Also with the patch, in a build configured with the Fedora 21 build's
settings:
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CFLAGS="-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
-mtune=generic" LDFLAGS="-Wl,-z,relro"
, I was unable to trigger an infloop in over ten minutes of aggressive
interaction with the window displaying the offending web page.
next prev parent reply other threads:[~2015-06-17 1:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-14 4:15 bug#20808: 24.5; Emacs looping with 100% CPU at line 15287 (?) of xdisp.c N. Jackson
2015-06-14 14:08 ` Eli Zaretskii
2015-06-14 19:16 ` N. Jackson
2015-06-14 19:46 ` Eli Zaretskii
2015-06-15 15:03 ` Eli Zaretskii
2015-06-15 15:42 ` N. Jackson
2015-06-16 15:03 ` Eli Zaretskii
2015-06-17 1:59 ` N. Jackson [this message]
2015-06-17 2:45 ` Eli Zaretskii
2015-06-17 11:30 ` N. Jackson
2015-06-17 17:22 ` Eli Zaretskii
2015-06-17 19:00 ` N. Jackson
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=87d20vhz6w.fsf@moondust.localdomain \
--to=nljlistbox2@gmail.com \
--cc=20808@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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).