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: Problem report #27 Date: Mon, 10 Apr 2006 12:01:16 -0700 Message-ID: <200604101901.k3AJ1GMq006032@scanner2.ics.uci.edu> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1144696118 25427 80.91.229.2 (10 Apr 2006 19:08:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Apr 2006 19:08:38 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 10 21:08:36 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 1FT1kJ-0002HS-D8 for ged-emacs-devel@m.gmane.org; Mon, 10 Apr 2006 21:08:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FT1kI-0004ST-Uh for ged-emacs-devel@m.gmane.org; Mon, 10 Apr 2006 15:08:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FT1jC-0003t6-2A for emacs-devel@gnu.org; Mon, 10 Apr 2006 15:07:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FT1jB-0003sd-82 for emacs-devel@gnu.org; Mon, 10 Apr 2006 15:07:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FT1jA-0003sW-RH for emacs-devel@gnu.org; Mon, 10 Apr 2006 15:07:08 -0400 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FT1ns-00077U-0q for emacs-devel@gnu.org; Mon, 10 Apr 2006 15:12:00 -0400 Original-Received: from vino.ics.uci.edu (vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.13.6/8.13.5) with ESMTP id k3AJ1GMq006032 for ; Mon, 10 Apr 2006 12:01:16 -0700 (PDT) Original-To: emacs-devel@gnu.org Original-Lines: 193 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=0.36, required 5, autolearn=disabled, ALL_TRUSTED -1.44, FM_MULTI_ODD2 1.10, FM_MULTI_ODD3 0.70) X-ICS-MailScanner-From: dann@vino.ics.uci.edu 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:52613 Archived-At: CID: 27 Checker: FORWARD_NULL (help) File: emacs/src/xmenu.c Function: xmenu_show Description: Variable "save_wv" tracked as NULL was dereferenced. Event assign_zero: Variable "save_wv" assigned value 0. Also see events: [var_deref_op] 2668 widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0; 2669 widget_value **submenu_stack 2670 = (widget_value **) alloca (menu_items_used * sizeof (widget_value *)); 2671 Lisp_Object *subprefix_stack 2672 = (Lisp_Object *) alloca (menu_items_used * sizeof (Lisp_Object)); 2673 int submenu_depth = 0; 2674 2675 int first_pane; 2676 2677 *error = NULL; 2678 2679 if (menu_items_used <= MENU_ITEMS_PANE_LENGTH) 2680 { 2681 *error = "Empty menu"; 2682 return Qnil; 2683 } 2684 2685 /* Create a tree of widget_value objects 2686 representing the panes and their items. */ 2687 wv = xmalloc_widget_value (); 2688 wv->name = "menu"; 2689 wv->value = 0; 2690 wv->enabled = 1; 2691 wv->button_type = BUTTON_TYPE_NONE; 2692 wv->help =Qnil; 2693 first_wv = wv; 2694 first_pane = 1; 2695 2696 /* Loop over all panes and items, filling in the tree. */ 2697 i = 0; At conditional (1): "i < menu_items_used" taking true path At conditional (7): "i < menu_items_used" taking true path 2698 while (i < menu_items_used) 2699 { At conditional (2): "((0), (menu_items & -8))->contents[i] == Qnil" taking false path At conditional (8): "((0), (menu_items & -8))->contents[i] == Qnil" taking false path 2700 if (EQ (XVECTOR (menu_items)->contents[i], Qnil)) 2701 { 2702 submenu_stack[submenu_depth++] = save_wv; 2703 save_wv = prev_wv; 2704 prev_wv = 0; 2705 first_pane = 1; 2706 i++; 2707 } At conditional (3): "((0), (menu_items & -8))->contents[i] == Qlambda" taking false path At conditional (9): "((0), (menu_items & -8))->contents[i] == Qlambda" taking false path 2708 else if (EQ (XVECTOR (menu_items)->contents[i], Qlambda)) 2709 { 2710 prev_wv = save_wv; 2711 save_wv = submenu_stack[--submenu_depth]; 2712 first_pane = 0; 2713 i++; 2714 } At conditional (4): "((0), (menu_items & -8))->contents[i] == Qt" taking true path At conditional (5): "submenu_depth != 0" taking false path At conditional (10): "((0), (menu_items & -8))->contents[i] == Qt" taking false path 2715 else if (EQ (XVECTOR (menu_items)->contents[i], Qt) 2716 && submenu_depth != 0) 2717 i += MENU_ITEMS_PANE_LENGTH; 2718 /* Ignore a nil in the item list. 2719 It's meaningful only for dialog boxes. */ At conditional (6): "((0), (menu_items & -8))->contents[i] == Qquote" taking true path At conditional (11): "((0), (menu_items & -8))->contents[i] == Qquote" taking false path 2720 else if (EQ (XVECTOR (menu_items)->contents[i], Qquote)) 2721 i += 1; At conditional (12): "((0), (menu_items & -8))->contents[i] == Qt" taking false path 2722 else if (EQ (XVECTOR (menu_items)->contents[i], Qt)) 2723 { 2724 /* Create a new pane. */ 2725 Lisp_Object pane_name, prefix; 2726 char *pane_string; 2727 2728 pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME); 2729 prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX); 2730 2731 #ifndef HAVE_MULTILINGUAL_MENU 2732 if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) 2733 { 2734 pane_name = ENCODE_MENU_STRING (pane_name); 2735 AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; 2736 } 2737 #endif 2738 pane_string = (NILP (pane_name) 2739 ? "" : (char *) SDATA (pane_name)); 2740 /* If there is just one top-level pane, put all its items directly 2741 under the top-level menu. */ 2742 if (menu_items_n_panes == 1) 2743 pane_string = ""; 2744 2745 /* If the pane has a meaningful name, 2746 make the pane a top-level menu item 2747 with its items as a submenu beneath it. */ 2748 if (!keymaps && strcmp (pane_string, "")) 2749 { 2750 wv = xmalloc_widget_value (); 2751 if (save_wv) 2752 save_wv->next = wv; 2753 else 2754 first_wv->contents = wv; 2755 wv->name = pane_string; 2756 if (keymaps && !NILP (prefix)) 2757 wv->name++; 2758 wv->value = 0; 2759 wv->enabled = 1; 2760 wv->button_type = BUTTON_TYPE_NONE; 2761 wv->help = Qnil; 2762 save_wv = wv; 2763 prev_wv = 0; 2764 } 2765 else if (first_pane) 2766 { 2767 save_wv = wv; 2768 prev_wv = 0; 2769 } 2770 first_pane = 0; 2771 i += MENU_ITEMS_PANE_LENGTH; 2772 } 2773 else 2774 { 2775 /* Create a new item within current pane. */ 2776 Lisp_Object item_name, enable, descrip, def, type, selected, help; 2777 item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME); 2778 enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE); 2779 descrip = AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY); 2780 def = AREF (menu_items, i + MENU_ITEMS_ITEM_DEFINITION); 2781 type = AREF (menu_items, i + MENU_ITEMS_ITEM_TYPE); 2782 selected = AREF (menu_items, i + MENU_ITEMS_ITEM_SELECTED); 2783 help = AREF (menu_items, i + MENU_ITEMS_ITEM_HELP); 2784 2785 #ifndef HAVE_MULTILINGUAL_MENU At conditional (13): "item_name & 7 == 3" taking true path At conditional (14): "((0), (item_name & -8))->size_byte >= 0" taking true path 2786 if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) 2787 { At conditional (15): "Vlocale_coding_system != Qnil" taking true path At conditional (16): "Vlocale_coding_system != 0" taking true path 2788 item_name = ENCODE_MENU_STRING (item_name); 2789 AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name; 2790 } 2791 At conditional (17): "descrip & 7 == 3" taking true path At conditional (18): "((0), (descrip & -8))->size_byte >= 0" taking true path 2792 if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) 2793 { At conditional (19): "Vlocale_coding_system != Qnil" taking true path At conditional (20): "Vlocale_coding_system != 0" taking true path 2794 descrip = ENCODE_MENU_STRING (descrip); 2795 AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip; 2796 } 2797 #endif /* not HAVE_MULTILINGUAL_MENU */ 2798 2799 wv = xmalloc_widget_value (); At conditional (21): "prev_wv != 0" taking false path 2800 if (prev_wv) 2801 prev_wv->next = wv; 2802 else Event var_deref_op: Variable "save_wv" tracked as NULL was dereferenced. Also see events: [assign_zero] 2803 save_wv->contents = wv; 2804 wv->name = (char *) SDATA (item_name);