After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 170704 - recursive MergeFile inclusion crashes gnome
recursive MergeFile inclusion crashes gnome
Status: RESOLVED FIXED
Product: gnome-menus
Classification: Core
Component: libgnome-menu
2.10.x
Other Linux
: Normal major
: ---
Assigned To: gnome-menus dummy account
gnome-menus dummy account
Depends on:
Blocks:
 
 
Reported: 2005-03-17 17:31 UTC by Matt Kynx
Modified: 2005-04-25 12:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matt Kynx 2005-03-17 17:31:42 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."
Comment 1 Mark McLoughlin 2005-03-18 08:04:48 UTC
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)
Comment 2 Mark McLoughlin 2005-04-25 12:03:30 UTC
Fixed on HEAD now, thanks