From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87h73ab8bo.fsf@gmail.com> <83zgh2kzlo.fsf@gnu.org> <83y1wlllnc.fsf@gnu.org> <83mtd1li6o.fsf@gnu.org> <835yjpl5vm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37279"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: andreyorst@gmail.com, 56683@debbugs.gnu.org, gregory@heytings.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 22 15:12:47 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEsSV-0009In-Js for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 15:12:47 +0200 Original-Received: from localhost ([::1]:41842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEsDT-0002DU-Bz for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 08:57:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEsDG-0002D7-8d for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 08:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEsDG-0007wb-03 for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 08:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oEsDF-0002a4-Rx for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 08:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jul 2022 12:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56683 X-GNU-PR-Package: emacs Original-Received: via spool by 56683-submit@debbugs.gnu.org id=B56683.16584945919857 (code B ref 56683); Fri, 22 Jul 2022 12:57:01 +0000 Original-Received: (at 56683) by debbugs.gnu.org; 22 Jul 2022 12:56:31 +0000 Original-Received: from localhost ([127.0.0.1]:40394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEsCl-0002Yu-6U for submit@debbugs.gnu.org; Fri, 22 Jul 2022 08:56:31 -0400 Original-Received: from mail-ej1-f52.google.com ([209.85.218.52]:38601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEsCj-0002Yf-TW for 56683@debbugs.gnu.org; Fri, 22 Jul 2022 08:56:30 -0400 Original-Received: by mail-ej1-f52.google.com with SMTP id l23so8459889ejr.5 for <56683@debbugs.gnu.org>; Fri, 22 Jul 2022 05:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :user-agent:mime-version:content-transfer-encoding; bh=ohxDlmlXIoibZHYX0/l5QoChE0EGy1ZejZXwswWDbZ4=; b=D1HYP3EzdtpWDUOwrX+VKYSDOOyXjNUDv8TDXQqXakUXxkHTIzh9dOXKv5MiPfw/EV +8cpgeLtZkABPB8GQ33BoOKhsqWE57Fg9JI6C6Y4hoxJPNe8H9NYVHxh9qxQByUbw2q8 MHGnzHQTXTOQXBOqh0yyuTVOPhxHwOKEYeQhN3iUzTj3DaqpLVY4N5ln596jDvaSI7J9 MCxd3ibm8upxaOwZduGobHvQMWVKzRC5R/hrQsS+XF2HExGP/L0mfcDlOVlTwQRkE1rJ 7zuqRstgAlNehi7770S3ldCaWGyYFC3qktATH3JXdHYWHMC41OVT0wXTdS53CDpzsdkb 6fFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:user-agent:mime-version:content-transfer-encoding; bh=ohxDlmlXIoibZHYX0/l5QoChE0EGy1ZejZXwswWDbZ4=; b=mxe36Xb/P5O0uTziCEmnkJYCpi273KGbM17cX2DBDMnDQG+AR4aqMrlpffuuFOiwQM Jke92ZQyPbnDqBYwpfwBonwABwpyFP1YgIBjjuid//3PVsWDSfkTG1ygGoMLaUa25fBr ENiUWiLSVfiURoZsMeq7gye6nR+6BfZuGAHptpFfT7uHnYmprcD2TVsb9x9w3JwbwtDb pp1Bc/6VxQn47Y5Wfy4i0sQPQWykLXjFQW0n50gkDI72reJsdM8gFojK5s/MR/nKa7vY cdHlfM/tlgMs680qtbOXVBRoBPYkWOrUGskmjTeM5XGlJWbnwix7nEtdsqSwpUydS2DC GfCQ== X-Gm-Message-State: AJIora9uiGuamuMLFbZmNSjCA819Jy0ZXOai+s8Pza870cbBproqrawV 06eRnte6S8jAPoPXqaMWaQU= X-Google-Smtp-Source: AGRyM1vBruI5rHJ2UB1LnOAljpptW7sH9FdEbzmYo+QezNGRRdVWMBrDKDpRHpdgUw66ooVW6n01Ng== X-Received: by 2002:a17:907:94ca:b0:72b:8f3e:3be0 with SMTP id dn10-20020a17090794ca00b0072b8f3e3be0mr395908ejc.462.1658494583759; Fri, 22 Jul 2022 05:56:23 -0700 (PDT) Original-Received: from Mini.fritz.box (p4fe3a8ba.dip0.t-ipconnect.de. [79.227.168.186]) by smtp.gmail.com with ESMTPSA id kv11-20020a17090778cb00b0072eddc468absm1989209ejc.134.2022.07.22.05.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 05:56:23 -0700 (PDT) In-Reply-To: <835yjpl5vm.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 22 Jul 2022 14:54:37 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237618 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann > > Yes, integer overflow. This code: > > init_to_row_start (&it, w, cursor_row); > if (hscl) > it.first_visible_x =3D window_hscroll_limited (w, it.f) > * FRAME_COLUMN_WIDTH (it.f); > it.last_visible_x =3D 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. >>=20 >> 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.