unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: andreyorst@gmail.com, 56683@debbugs.gnu.org, gregory@heytings.org
Subject: bug#56683: 29.0.50; long lines fix doesn't work correctly when lines are truncated
Date: Fri, 22 Jul 2022 14:56:22 +0200	[thread overview]
Message-ID: <m2mtd1tifd.fsf@Mini.fritz.box> (raw)
In-Reply-To: <835yjpl5vm.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 22 Jul 2022 14:54:37 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>
> Yes, integer overflow.  This code:
>
> 	      init_to_row_start (&it, w, cursor_row);
> 	      if (hscl)
> 		it.first_visible_x = window_hscroll_limited (w, it.f)
> 				     * FRAME_COLUMN_WIDTH (it.f);
> 	      it.last_visible_x = DISP_INFINITY;
> 	      move_it_in_display_line_to (&it, pt, -1, MOVE_TO_POS);
>
> will keep producing glyphs inside move_it_in_display_line_to until
> it gets to the position of point.  While producing glyphs,
> it.current_x is incremented by the pixel-width of each produced
> glyph.  After a large enough number of produced glyphs, it.current_x
> will overflow INT_MAX.

Right.  I am not worried about that:

It takes a lot of iterations until the ints overflow.  The largest
positive 32-bit integer is very roughly 2 * 10^9.  With a font width of
of 10 pixels, that would mean 2 * 10^8 characters (200 Mb), and so on
with wider fonts.

Se that being said, what I orignally wanted to ask, was:

>> The thing you implemented in set_iterator_to_next we talked about.
>> 
>>   if (max_redisplay_ticks > 0)
>>     update_redisplay_ticks (1, it->w);
>
> I understood that part, but not the "should be burn to much time
> because of the infinite last x" part, even if I replace "to" with
> "too".

Sorry for the typo: s/be/we, i.e. "if we burn...".  What I meant to ask
is if the check above doesn't lead to a signal anyway long before we
reach the overflow.





  reply	other threads:[~2022-07-22 12:56 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 18:49 bug#56683: 29.0.50; long lines fix doesn't work correctly when lines are truncated Andrey Listopadov
2022-07-21 19:45 ` Gregory Heytings
2022-07-21 19:57   ` Eli Zaretskii
2022-07-21 20:15     ` Gregory Heytings
2022-07-22  6:13       ` Eli Zaretskii
2022-07-22  6:51         ` Gerd Möllmann
2022-07-22  7:28           ` Eli Zaretskii
2022-07-22  7:52             ` Gerd Möllmann
2022-07-22 11:54               ` Eli Zaretskii
2022-07-22 12:56                 ` Gerd Möllmann [this message]
2022-07-22 13:36                   ` Eli Zaretskii
2022-07-22 13:54                     ` Gerd Möllmann
2022-07-22 14:35                       ` Eli Zaretskii
2022-07-25 22:22                         ` Gregory Heytings
2022-07-26  7:12                           ` Andrey Listopadov
2022-07-26  7:32                             ` Gregory Heytings
2022-07-26 12:15                               ` Eli Zaretskii
2022-07-26 11:42                           ` Eli Zaretskii
2022-07-26 12:17                             ` Gregory Heytings
2022-07-26 12:37                               ` Eli Zaretskii
2022-07-26 12:50                                 ` Gregory Heytings
2022-07-26 13:15                                   ` Eli Zaretskii
2022-07-26 13:25                                     ` Gregory Heytings
2022-07-26 17:26                                       ` Eli Zaretskii
2022-07-26 20:14                                         ` Gregory Heytings
2022-07-22  6:53         ` Gerd Möllmann
2022-07-22  7:31           ` Eli Zaretskii
2022-07-22  7:53             ` Gerd Möllmann
2022-07-22 11:01               ` Eli Zaretskii
2022-07-21 20:31   ` Andrey Listopadov
2022-07-21 20:52     ` Gregory Heytings
2022-07-22  5:03       ` Andrey Listopadov
2022-07-22  6:34         ` Gregory Heytings
2022-07-22  6:30   ` Eli Zaretskii
2022-07-22  7:28     ` Gerd Möllmann

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=m2mtd1tifd.fsf@Mini.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=56683@debbugs.gnu.org \
    --cc=andreyorst@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gregory@heytings.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).