bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45907: [PATCH] Shr memory singularity gif89a


From: Lars Ingebrigtsen
Subject: bug#45907: [PATCH] Shr memory singularity gif89a
Date: Tue, 19 Jan 2021 06:57:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

dick <dick.r.chiang@gmail.com> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]