emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem report #18 PENDING


From: Jan D.
Subject: Re: Problem report #18 PENDING
Date: Tue, 11 Apr 2006 08:58:00 +0200
User-agent: Thunderbird 1.5 (X11/20051201)



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.

        Jan D.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]