From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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 16:36:56 +0300 Message-ID: <83y1wljmkn.fsf@gnu.org> 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: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18776"; mail-complaints-to="usenet@ciao.gmane.io" Cc: andreyorst@gmail.com, 56683@debbugs.gnu.org, gregory@heytings.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 22 15:40:00 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 1oEsso-0004dZ-Hc for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 15:39:58 +0200 Original-Received: from localhost ([::1]:45924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEssn-0001dT-1q for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 09:39:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEsqw-000070-Kd for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 09:38:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEsqw-00016U-Aw for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 09:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oEsqw-0003i5-7Y for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 09:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jul 2022 13:38:02 +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.165849702714188 (code B ref 56683); Fri, 22 Jul 2022 13:38:02 +0000 Original-Received: (at 56683) by debbugs.gnu.org; 22 Jul 2022 13:37:07 +0000 Original-Received: from localhost ([127.0.0.1]:40441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEsq2-0003gl-IP for submit@debbugs.gnu.org; Fri, 22 Jul 2022 09:37:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:32936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEsq1-0003gJ-Vn for 56683@debbugs.gnu.org; Fri, 22 Jul 2022 09:37:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEspw-0000cT-CF; Fri, 22 Jul 2022 09:37:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Dpl+UXv4AsSx8G3p2E8wxBAkyPrDfrrF7hWnmIAAgeM=; b=Ak/eI1h+us33Vtz8zf+g rilFoPeBtfVOaRL7WtmBXYoJoOaNgxbqt9KyyQSrIsVnlTxz3RKp9y9+FZqRF/iFntwuQvMX5Wo+2 4g3ZO+wRo7Rjq9ykgLcMAthR/5wG7YIM4yZ3RGAIb+c8T3b5+h2F4VHlmf3G/SYkvupXcUETuEknd hI0C2RQyeMsE3R3Do1f/eQ9CTsgGwGsEPT9UkT5mj//x7RzvQ/PLUTIG3iPX5k93xk/Nk8TGt6lIg c0Gih77TyvzHxi0tsbbe++0WxGgX+HmR04lwcnteT3ptlH6aTvBrStNfzngpy1WP7mux3xoJ8Iu63 M1pCe6iIV3Y6eg==; Original-Received: from [87.69.77.57] (port=3527 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEspv-0002tr-SQ; Fri, 22 Jul 2022 09:37:00 -0400 In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Fri, 22 Jul 2022 14:56:22 +0200) 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:237623 Archived-At: > From: Gerd Möllmann > Cc: andreyorst@gmail.com, 56683@debbugs.gnu.org, gregory@heytings.org > Date: Fri, 22 Jul 2022 14:56:22 +0200 > > > 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. We already have an example of a 19-MB file which is a single line. It is within an order of magnitude of the limit you described. JSON files in particular are known to be like that: long and without newlines. So I think the danger is real. > >> 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. That feature is disabled by default. If enabled, then yes, it will most probably fire before that.