From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45907: [PATCH] Shr memory singularity gif89a Date: Tue, 19 Jan 2021 06:57:47 +0100 Message-ID: <87v9bto4dg.fsf@gnus.org> References: <871relaiyy.fsf@dick> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22675"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45907@debbugs.gnu.org To: dick Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 19 06:59:12 2021 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 1l1k2p-0005mh-PK for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jan 2021 06:59:11 +0100 Original-Received: from localhost ([::1]:50080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1k2o-0004Np-PS for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jan 2021 00:59:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1k2g-0004LO-NE for bug-gnu-emacs@gnu.org; Tue, 19 Jan 2021 00:59:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1k2g-0005v4-Fn for bug-gnu-emacs@gnu.org; Tue, 19 Jan 2021 00:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l1k2g-00078C-FQ for bug-gnu-emacs@gnu.org; Tue, 19 Jan 2021 00:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jan 2021 05:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45907 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45907-submit@debbugs.gnu.org id=B45907.161103588727330 (code B ref 45907); Tue, 19 Jan 2021 05:59:02 +0000 Original-Received: (at 45907) by debbugs.gnu.org; 19 Jan 2021 05:58:07 +0000 Original-Received: from localhost ([127.0.0.1]:49124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1k1m-00076k-Ne for submit@debbugs.gnu.org; Tue, 19 Jan 2021 00:58:06 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:54860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1k1k-00076D-SA for 45907@debbugs.gnu.org; Tue, 19 Jan 2021 00:58:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6cDpj/6LugI2YbpunLPt6yCPdCuYGTlDwpWm6FH7czI=; b=XYLNcgncEdCSYrDRSy/KDVsAIL M1dIg5M6xgiKJ8G4Nd1Uj0HJGF62tvsmMSMoTQElatGlbb/vmkllQyvhejCln3OpRYNNaUnMAhOdc rVreRBkwpxsplDAYGX+Z702l6HC0jWkc+mlHIGC7mkOvvR9ksDaP1IAtw9L9P678uBZw=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1k1Y-00049D-JJ; Tue, 19 Jan 2021 06:57:58 +0100 X-Now-Playing: Spiders Webb's _For Discos Only (2)_: "I don't know what's on your Mind (Special 12inch Disco Mix)" In-Reply-To: <871relaiyy.fsf@dick> (dick's message of "Fri, 15 Jan 2021 18:17:09 -0500") 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:198127 Archived-At: dick writes: > With the increased use of gif89a, my gnus is achieving memory > consumption singularity more frequently. > > * lisp/net/shr.el (shr-put-image): When content-type is > application/octet-stream, do not attempt insert-image. This was a slightly confusing bug report and patch, but I think this was the proposed functional change: diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 9c3740fccc..c05ac17521 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1124,6 +1124,8 @@ shr-put-image ((eq content-type 'image/svg+xml) (when (image-type-available-p 'svg) (create-image data 'svg t :ascent 100))) + ((eq content-type 'application/octet-stream) + nil) ((eq size 'full) (ignore-errors (shr-rescale-image data content-type But I don't think that makes much sense: It doesn't really matter what the content type is. The problem is that Emacs chokes on a particular GIF file. To reproduce: curl "https://raw.githubusercontent.com/enphysoft/search-gmail-using-message-id/main/images/lgmid.gif" > /tmp/lgmid.gif emacs -Q /tmp/lgmid.gif This initially hangs Emacs, but then it finally is able to display the file... but Emacs uses 2GB worth of memory and 100% CPU. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no