From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: trunk r113947: * image.c: Fix animation cache signature memory leak. Date: Mon, 19 Aug 2013 18:40:11 +0200 Message-ID: References: <521244F0.3060508@cs.ucla.edu> <521246C4.3070004@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1376930442 28570 80.91.229.3 (19 Aug 2013 16:40:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Aug 2013 16:40:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 19 18:40:44 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VBSVX-0007N1-T0 for ged-emacs-devel@m.gmane.org; Mon, 19 Aug 2013 18:40:44 +0200 Original-Received: from localhost ([::1]:44102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBSVX-0007G9-8v for ged-emacs-devel@m.gmane.org; Mon, 19 Aug 2013 12:40:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBSVN-0007Et-Jg for emacs-devel@gnu.org; Mon, 19 Aug 2013 12:40:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBSVF-0004SA-0H for emacs-devel@gnu.org; Mon, 19 Aug 2013 12:40:33 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:46346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBSVE-0004Rh-PY for emacs-devel@gnu.org; Mon, 19 Aug 2013 12:40:24 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1VBSV1-0008FK-JQ; Mon, 19 Aug 2013 18:40:11 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAKlBMVEWTb3YVDArj1uj5+f3z 7/rRvtFuPDf9/v7////t5vT+//6miZfAp7qIWlvb856/AAACKElEQVQ4jW3SsY6bQBAA0KnSEBc0 +YCNUUQNke9ag5RsSzRSpNDQbOeKRPhqR8JyiX2KVvmApKRLsbg5iWq3cOWOf8ks5/PZmClsNG+Y 2Vkb1n2syrv1dYD92Gzy9Wx5Az/w6aMxX4dvLNe/walr+HcLHmqD+OUGij/Fw/uiKK9nlLCsWMV8 v5IfBnDHeSwjKfmvK8hpxsYeeDChDGG4WJ/+u7ofhSDPOSzHIIrmY1CGcVyNQR5zyS6hfP5ahXPJ vEtYnV7gtDKOQMgZ88zlcVenTtUQnmesYu4xNLcLfg8lwzEI4oryBj4PIeSPiK2GaJAvQ+khpgp2 g9V/ct92UjAtrl94oNGt0Qr88/T+tOV95aUpWvh0sV9Z5D20CiA5w4zSQcArlhq0sD01KqKA8qEv H7G1gNvTsfIoCsKI+3KOaUqnal+G5NtdWMlq6lct6m8WtjP7LyyDWErGmM8YJrQ4mGQaFcU6zyNK 07WyBGlBtYcG/V0U0O8vK7oKigS91NQATct8uQvorj17FcYklG/qCTgGqTGP7fH7oBvUuj4StEjE vCetKBprWsMRDsoWIepG13ASXU8EdA49tmjqt9ABAIFq6n2XweLg2DLdOUfRHTpQ1LGeLAiozlFG iYMQi07YMgVHkYEtO1CR6DJXkBHUBC4BBai9EK7rkkHtwKGHRddRuzeuBdd9R50nC5ERiM5a5p7C drA1BLazeAWK7Ayv+R7cMXiJ/66uE2jh3QDTAAAAAElFTkSuQmCC X-Now-Playing: The Cure's _Seventeen Seconds (1)_: "M" X-Hashcash: 1:23:130819:emacs-devel@gnu.org::ZPYXyusMDxyyhvTl:000000000000000000000000000000000000000000Gghg X-Hashcash: 1:23:130819:eggert@cs.ucla.edu::Vp7zMhwfeVWdLyLx:0000000000000000000000000000000000000000000IzGz In-Reply-To: <521246C4.3070004@cs.ucla.edu> (Paul Eggert's message of "Mon, 19 Aug 2013 09:24:36 -0700") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-MailScanner-ID: 1VBSV1-0008FK-JQ MailScanner-NULL-Check: 1377535211.82033@TztvrogzceQle6gytuBfhg X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162884 Archived-At: Paul Eggert writes: > Hmmm, well, then I must have tested it incorrectly. > There was a dancing image on my screen, anyway.... But this is the code. animation_cache starts off as NULL. That means that *pcache is NULL, right? So the for loop never happens. So cache is still NULL, and then we dereference that and blow up. Or am I misreading this completely? It wouldn't be the first time... static struct animation_cache * imagemagick_get_animation_cache (MagickWand *wand) { char *signature = MagickGetImageSignature (wand); struct animation_cache *cache; struct animation_cache **pcache = &animation_cache; imagemagick_prune_animation_cache (); cache = animation_cache; for (pcache = &animation_cache; *pcache; pcache = &cache->next) { cache = *pcache; if (! cache) { *pcache = cache = imagemagick_create_cache (signature); break; } if (strcmp (signature, cache->signature) == 0) { DestroyString (signature); break; } } cache->update_time = current_emacs_time (); return cache; } -- (domestic pets only, the antidote for overdose, milk.) No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php and http://lars.ingebrigtsen.no/2013/08/twenty-years-of-september.html