all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: "corrupted size vs. prev_size"
Date: Tue, 12 Apr 2022 12:59:38 +0200	[thread overview]
Message-ID: <87mtgqworp.fsf@gnus.org> (raw)

After the recent GIF/WebP caching changes, I sometimes get "corrupted
size vs. prev_size" and Emacs then hangs, so I guess I'm messing up
something in the memory allocation/freeing/writing bits somewhere.

But I'm getting it very, very rarely -- like one out of every thirty
times with a bunch of WebP/GIF images, so it's hard to track down.
Connecting to the hung Emacs isn't very informative:

(gdb) info threads
  Id   Target Id                                        Frame 
* 1    Thread 0x7f303a430000 (LWP 84136) "emacs"        0x00007f303d54e1f3 in __pselect (nfds=22, readfds=0x7ffd058d69e0, writefds=0x7ffd058d6a60, 
    exceptfds=0x0, timeout=0x7ffd058d6800, sigmask=<optimized out>)
    at ../sysdeps/unix/sysv/linux/pselect.c:52
  2    Thread 0x7f3039229640 (LWP 84137) "gmain"        0x00007f303d54b87f in __GI___poll (fds=0x561b63028870, nfds=2, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
  3    Thread 0x7f303898c640 (LWP 84138) "gdbus"        0x00007f303d54b87f in __GI___poll (fds=0x561b63452d20, nfds=3, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
  4    Thread 0x7f3033fff640 (LWP 84139) "dconf worker" 0x00007f303d54b87f in __GI___poll (fds=0x561b634be7d0, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29

I've stared at the code for some time now to see whether I can track the
problem down that way -- perhaps I've got some lifetime issues;
deallocating webp iterators twice, for instance, or something similar in
the gif code.  Does anybody else see something obviously wonky in that
code in gif_load or webp_load?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




             reply	other threads:[~2022-04-12 10:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 10:59 Lars Ingebrigtsen [this message]
2022-04-12 11:14 ` "corrupted size vs. prev_size" Andreas Schwab
2022-04-12 11:23   ` Lars Ingebrigtsen
2022-04-12 11:26     ` Po Lu
2022-04-12 11:41 ` Lars Ingebrigtsen
2022-04-12 11:45   ` Lars Ingebrigtsen
2022-04-12 12:26     ` Lars Ingebrigtsen
2022-04-12 12:54       ` Lars Ingebrigtsen
2022-04-12 13:13         ` Lars Ingebrigtsen
2022-04-12 14:09           ` Lars Ingebrigtsen
2022-04-12 11:44 ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtgqworp.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.