dbus crashing with no environment

Bastien Nocera hadess at hadess.net
Tue Nov 25 07:18:40 PST 2008


Heya,

I was trying to see why fprintd was crashing when using the service
activation, and Richard mentioned that I should try clearing the
environment as that's what the activation helper does.

I don't actually need any environment in fprintd, so went ahead with it,
and ended up with crashes in dbus itself. fprintd uses dbus-glib, but I
was able to reproduce with the attached DBus-only test case.

Valgrind says:
==27849== Invalid read of size 8
==27849==    at 0x3034A35ED9: unsetenv (in /lib64/libc-2.9.so)
==27849==    by 0x4A08BC3: unsetenv (mc_replace_strmem.c:760)
==27849==    by 0x303E829D54: _dbus_setenv (dbus-sysdeps.c:112)
==27849==    by 0x303E80B28A: internal_bus_get (dbus-bus.c:259)
==27849==    by 0x400643: main (test.c:9)
==27849==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

This is mighty weird, as dbus-bus.c's line 259 is:
      if (!_dbus_setenv ("DBUS_ACTIVATION_ADDRESS", NULL))
        return FALSE;

Ideas?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 187 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20081125/b72fd869/attachment.c 


More information about the dbus mailing list