From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: crash in the cvs head build of Feb 13 08:40 Date: Fri, 17 Feb 2006 14:36:53 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1140238471 4939 80.91.229.2 (18 Feb 2006 04:54:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2006 04:54:31 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 18 05:54:29 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FAK6z-0007oP-A6 for ged-emacs-devel@m.gmane.org; Sat, 18 Feb 2006 05:54:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FAK6y-0006Qe-5X for ged-emacs-devel@m.gmane.org; Fri, 17 Feb 2006 23:54:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FABdT-0007m7-0N for emacs-devel@gnu.org; Fri, 17 Feb 2006 14:51:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FAAeO-0003nG-G9 for emacs-devel@gnu.org; Fri, 17 Feb 2006 13:49:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FA5nu-0008HE-Df for emacs-devel@gnu.org; Fri, 17 Feb 2006 08:37:47 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FA5tG-0001Du-NY for emacs-devel@gnu.org; Fri, 17 Feb 2006 08:43:18 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepc.post.tele.dk (Postfix) with SMTP id 527EF262863 for ; Fri, 17 Feb 2006 14:37:40 +0100 (CET) Original-To: emacs-devel@gnu.org In-Reply-To: (Sam Steingold's message of "Wed, 15 Feb 2006 08:49:12 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50674 Archived-At: Sam Steingold writes: > GNU Emacs 22.0.50.5 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) > of 2006-02-15 on quant8 > > Program received signal SIGSEGV, Segmentation fault. > 0x080868fa in digest_single_submenu (start=Variable "start" is not available. > ) at xmenu.c:1847 > 1847 save_wv->contents = wv; > (gdb) list > 1842 > 1843 wv = xmalloc_widget_value (); > 1844 if (prev_wv) > 1845 prev_wv->next = wv; > 1846 else > 1847 save_wv->contents = wv; > 1848 > 1849 wv->lname = item_name; > 1850 if (!NILP (descrip)) > 1851 wv->lkey = descrip; > (gdb) p save_wv > $1 = (widget_value *) 0x0 > (gdb) p prev_wv > $2 = (widget_value *) 0x0 It looks like some specific sequence of menu items can trigger the crash (don't know which). I don't quite understand the code, but the following patch looks like a reasonable guard against the crash. I have no way of testing it though. *** xmenu.c 06 Feb 2006 18:21:51 +0100 1.299 --- xmenu.c 17 Feb 2006 14:33:19 +0100 *************** *** 1843,1850 **** wv = xmalloc_widget_value (); if (prev_wv) prev_wv->next = wv; ! else save_wv->contents = wv; wv->lname = item_name; if (!NILP (descrip)) --- 1843,1852 ---- wv = xmalloc_widget_value (); if (prev_wv) prev_wv->next = wv; ! else if (save_wv) save_wv->contents = wv; + else + first_wv->contents = wv; wv->lname = item_name; if (!NILP (descrip)) -- Kim F. Storm http://www.cua.dk