GNOME Bugzilla – Bug 170704
recursive MergeFile inclusion crashes gnome
Last modified: 2005-04-25 12:03:30 UTC
1. Create the following file in /home/[yourname]/.config/menus/applications.menu: <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> <Menu> <Name>Applications</Name> <MergeFile>/home/[yourname]/.config/menus/applications.menu</MergeFile> </Menu> 2. killall gnome-panel Expected: And empty 'Applications' menu Actual: 100% CPU, max memory, one dead Gnome :( According to the spec: (http://standards.freedesktop.org/menu-spec/menu-spec-latest.html#merge-algorithm) "Continue processing until no <MergeFile>, <MergeDir>, or <LegacyDir> elements remain, taking care to avoid infinite loops caused by files that reference one another."
Yep, known issue: /* FIXME * if someone does <MergeFile>A.menu</MergeFile> inside * A.menu, or a more elaborate loop involving multiple * files, we'll just get really hosed and eat all the RAM * we can find */ static void menu_tree_resolve_files (MenuTree *tree, MenuLayoutNode *layout)
Fixed on HEAD now, thanks