Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140536 - dbus should always --enable-checks
Summary: dbus should always --enable-checks
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-15 11:49 UTC by Sven Wegener
Modified: 2006-09-21 16:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Wegener gentoo-dev 2006-07-15 11:49:52 UTC
The sys-apps/dbus package should always --enable-checks and should not make it depend on the debug USE flag. The checks are necessary as they validate external input. Code like the following from dbus-object-tree.c:_dbus_object_tree_unregister_and_unlock will segfault if you try to unregister a non-existent path, as the checks are completely removed if we disable checks and asserts.

  subtree = find_subtree (tree, path, &i);

#ifndef DBUS_DISABLE_CHECKS
  if (subtree == NULL)
    {
      _dbus_warn ("Attempted to unregister path (path[0] = %s path[1] = %s) which isn't registered\n",
                  path[0] ? path[0] : "null",
                  path[1] ? path[1] : "null");
      goto unlock;
    }
#else
  _dbus_assert (subtree != NULL);
#endif

  _dbus_assert (subtree->parent == NULL ||
                (i >= 0 && subtree->parent->subtrees[i] == subtree));

  subtree->message_function = NULL;
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2006-09-21 16:12:15 UTC
I swear I had this in there ages ago.... Someone must have reverted it. It's in 0.62-r1 and up.