From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: grischka Newsgroups: gmane.emacs.bugs Subject: bug#7190: Crash in menus on w32 Date: Thu, 21 Oct 2010 19:07:42 +0200 Message-ID: <4CC0735E.5080406@gmx.de> References: <4CC01FDD.5060707@gmx.de> <877hhb4ldd.fsf@home.jasonrumney.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1287681174 6888 80.91.229.12 (21 Oct 2010 17:12:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Oct 2010 17:12:54 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Jason Rumney Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 21 19:12:53 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8yhA-000158-7Q for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Oct 2010 19:12:52 +0200 Original-Received: from localhost ([127.0.0.1]:50190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8yh9-0000cg-EM for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Oct 2010 13:12:51 -0400 Original-Received: from [140.186.70.92] (port=41330 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8yh2-0000bt-5D for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2010 13:12:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8ygy-0007Eb-Oq for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2010 13:12:44 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8ygy-0007ER-Mz for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2010 13:12:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P8yZa-00087u-K2; Thu, 21 Oct 2010 13:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: grischka Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Oct 2010 17:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7190 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.128768065431221 (code B ref -1); Thu, 21 Oct 2010 17:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Oct 2010 17:04:14 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P8yYm-00087W-OV for submit@debbugs.gnu.org; Thu, 21 Oct 2010 13:04:13 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P8yYk-00087R-Bd for submit@debbugs.gnu.org; Thu, 21 Oct 2010 13:04:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8ycQ-0006Ky-Ss for submit@debbugs.gnu.org; Thu, 21 Oct 2010 13:08:01 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:37615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8ycQ-0006Kt-OV for submit@debbugs.gnu.org; Thu, 21 Oct 2010 13:07:58 -0400 Original-Received: from [140.186.70.92] (port=52898 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8ycP-0008I9-Fr for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2010 13:07:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8ycN-0006KC-JJ for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2010 13:07:57 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:37493 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1P8ycN-0006Jh-6k for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2010 13:07:55 -0400 Original-Received: (qmail invoked by alias); 21 Oct 2010 17:07:53 -0000 Original-Received: from unknown (EHLO [10.44.157.233]) [82.113.121.196] by mail.gmx.net (mp005) with SMTP; 21 Oct 2010 19:07:53 +0200 X-Authenticated: #18588216 X-Provags-ID: V01U2FsdGVkX18bqhpVHN0bGiwNZDBxdLx+L4IF+/XGvoLAwCes5v QIgw8/bXQduYIB User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <877hhb4ldd.fsf@home.jasonrumney.net> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 21 Oct 2010 13:05:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:41039 Archived-At: Jason Rumney wrote: > I don't see anything in your change to handle freeing of the menubar > structures in the case where the user clicks on the menubar then clicks > away without selecting anything. This is correct. The patch frees the item-string always when (and in the same place where) the MENUITEM structure itself is destroyed. Since this structure is the only place that has the pointer, it is hence impossible by design to access the pointer after it was freed. > The above code was to fix a memory and resource leak in that case. With the patch, leaking these strings cannot happen by design also provided the MENUITEMs themselves are destroyed correctly always which is made sure by bugs 2/3 fixed: >> 2) memory leak: was trying to free items from already deleted menu >> 3) memory leak: was trying to free menu from already deleted window --- grischka