Skip Menu |

This queue is for tickets about the Net-DBus CPAN distribution.

Report information
The Basics
Id: 24833
Status: resolved
Priority: 0/
Queue: Net-DBus

People
Owner: Nobody in particular
Requestors: bduc [...] dyndaco.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.33.4
Fixed in: (no value)



Subject: Segmentation fault
When trying to connect to a bus (system/session) when the corresponding daemon is not present ; result's in a segfault because _open tries to ref a non existent connection. dbus_connection_open returns NULL; croak is correct but dbus_connection_ref should be done when conn != NULL Attached patch file solves the problem. libdbus was built without assert (--disable-assert)
Subject: DBus.xs.patch
--- DBus.xs.org 2006-11-05 22:47:57.000000000 +0100 +++ DBus.xs 2007-02-07 11:23:48.000000000 +0100 @@ -464,10 +464,10 @@ CODE: dbus_error_init(&error); con = dbus_connection_open(address, &error); - dbus_connection_ref(con); if (!con) { _croak_error (&error); } + dbus_connection_ref(con); RETVAL = con; OUTPUT: RETVAL @@ -826,10 +826,10 @@ CODE: dbus_error_init(&error); con = dbus_bus_get(type, &error); - dbus_connection_ref(con); if (!con) { _croak_error(&error); } + dbus_connection_ref(con); RETVAL = con; OUTPUT: RETVAL
This patch has been incorporated in the upstream source repo and will be included in the next release to CPAN.
This is fixed in Net-DBus 0.33.6 now available on CPAN