Jason Rumney wrote:
The problem is that there is only one copy of the menu structure kept.
So when the second menu is created, it overwrites the first one. This
causes two bugs:
1) A memory leak, since the first menu structure is never freed.
2) The menu structure for the second menu is destroyed while the menu is
still active.
Here is the end of x-popup-menu in w32menu.c. It looks to me like the
menu structure is freed before "selection" is used. Obviously you think
otherwise, Jason. Can you explain to me what is happening here? Does
perhaps w32_menu_show do more than the name suggests?
/* Display them in a menu. */
BLOCK_INPUT;
selection = w32_menu_show (f, xpos, ypos, for_click,
keymaps, title, &error_name);
UNBLOCK_INPUT;
discard_menu_items ();
w32_free_menu_strings (FRAME_W32_WINDOW (f));
#endif /* HAVE_MENUS */
UNGCPRO;
if (error_name) error (error_name);
return selection;
}
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug