chiark / gitweb /
sd-bus: mark sd_bus_unref() as broken regarding self-refs
authorDavid Herrmann <dh.herrmann@gmail.com>
Sat, 22 Mar 2014 18:31:31 +0000 (19:31 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Sat, 22 Mar 2014 18:35:25 +0000 (19:35 +0100)
commit374c356979ba7222fa7e09005824fe6996b0e91e
treec6498deae329785c2eb1ebe6766e392ecfe8a5d5
parent23aedd029452b65c11b6eb838e44f60be1c66814
sd-bus: mark sd_bus_unref() as broken regarding self-refs

If you allocate a message with bus==NULL and then unref the main bus,
it will free your message underneath and your program will go boom!

To fix that, we really need to figure out what the semantics for
self-references (m->bus) should be and when/where/what accesses are
actually allowed.

Same is true for the pseudo-thread-safety we employ..
TODO
src/libsystemd/sd-bus/sd-bus.c