From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Problem report #18 PENDING Date: Sat, 13 May 2006 12:01:59 -0700 Message-ID: <200605131901.k4DJ1xSb030866@amrm2.ics.uci.edu> References: <200604101859.k3AIx3In005649@scanner2.ics.uci.edu> <443B5378.5070902@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147546944 9271 80.91.229.2 (13 May 2006 19:02:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 13 May 2006 19:02:24 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 13 21:02:22 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 1FezNb-0001se-PI for ged-emacs-devel@m.gmane.org; Sat, 13 May 2006 21:02:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FezNb-0000O3-8Z for ged-emacs-devel@m.gmane.org; Sat, 13 May 2006 15:02:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FezNQ-0000MY-B6 for emacs-devel@gnu.org; Sat, 13 May 2006 15:02:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FezNM-0000LS-In for emacs-devel@gnu.org; Sat, 13 May 2006 15:02:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FezNM-0000LP-Gi for emacs-devel@gnu.org; Sat, 13 May 2006 15:02:04 -0400 Original-Received: from [128.195.11.178] (helo=amrm2.ics.uci.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FezPN-0001Gj-Lz for emacs-devel@gnu.org; Sat, 13 May 2006 15:04:09 -0400 Original-Received: from amrm2.ics.uci.edu (amrm2.ics.uci.edu [127.0.0.1]) by amrm2.ics.uci.edu (8.13.6/8.13.6) with ESMTP id k4DJ21Ct030867; Sat, 13 May 2006 12:02:01 -0700 Original-Received: (from dann@localhost) by amrm2.ics.uci.edu (8.13.6/8.13.6/Submit) id k4DJ1xSb030866; Sat, 13 May 2006 12:01:59 -0700 Original-To: "Jan D." In-Reply-To: <443B5378.5070902@swipnet.se> (Jan D.'s message of "Tue, 11 Apr 2006 08:58:00 +0200") Original-Lines: 82 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:54395 Archived-At: "Jan D." writes: > Dan Nicolaescu wrote: > > CID: 18 > > Checker: FORWARD_NULL (help) > > File: emacs/src/xmenu.c > > Function: digest_single_submenu > > Description: Variable "save_wv" tracked as NULL was dereferenced. > > > > Event assign_zero: Variable "prev_wv" assigned value 0. > > Also see events: [alias_transfer][var_deref_op] > > > > 1815 prev_wv = 0; > > 1816 i += MENU_ITEMS_PANE_LENGTH; > > 1817 } > > 1818 else > > 1819 { > > 1820 /* Create a new item within current pane. */ > > 1821 Lisp_Object item_name, enable, descrip, def, type, selected; > > 1822 Lisp_Object help; > > 1823 > > 1824 item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME); > > 1825 enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE); > > 1826 descrip = AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY); > > 1827 def = AREF (menu_items, i + MENU_ITEMS_ITEM_DEFINITION); > > 1828 type = AREF (menu_items, i + MENU_ITEMS_ITEM_TYPE); > > 1829 selected = AREF (menu_items, i + MENU_ITEMS_ITEM_SELECTED); > > 1830 help = AREF (menu_items, i + MENU_ITEMS_ITEM_HELP); > > 1831 > > 1832 #ifndef HAVE_MULTILINGUAL_MENU > > > > At conditional (9): "((0), (item_name & -8))->size_byte >= 0" taking true path > > > > 1833 if (STRING_MULTIBYTE (item_name)) > > 1834 { > > > > At conditional (10): "Vlocale_coding_system != Qnil" taking true path > > At conditional (11): "Vlocale_coding_system != 0" taking true path > > > > 1835 item_name = ENCODE_MENU_STRING (item_name); > > 1836 AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name; > > 1837 } > > 1838 > > > > At conditional (12): "descrip & 7 == 3" taking true path > > At conditional (13): "((0), (descrip & -8))->size_byte >= 0" taking true path > > > > 1839 if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) > > 1840 { > > > > At conditional (14): "Vlocale_coding_system != Qnil" taking true path > > At conditional (15): "Vlocale_coding_system != 0" taking true path > > > > 1841 descrip = ENCODE_MENU_STRING (descrip); > > 1842 AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip; > > 1843 } > > 1844 #endif /* not HAVE_MULTILINGUAL_MENU */ > > 1845 > > 1846 wv = xmalloc_widget_value (); > > > > At conditional (16): "prev_wv != 0" taking false path > > > > 1847 if (prev_wv) > > 1848 prev_wv->next = wv; > > 1849 else > > > > Event var_deref_op: Variable "save_wv" tracked as NULL was dereferenced. > > Also see events: [assign_zero][alias_transfer] > > > > 1850 save_wv->contents = wv; > > 1851 > > 1852 wv->lname = item_name; > > The thing is that the code assumes menu descriptions first have panes > and then items. In that case save_wv will always be != NULL (the /* > Create a new pane. */ branch). I don't know if it is possible to give > a description (in lisp) that only contains items. Maybe it is. Has anybody reached a conclusion about this issue? Thanks