assertion failure looks likely on re-opening disconnected shared connection
Submitted by Havoc Pennington
Assigned to D-Bus Maintainers
Description
In dbus_connection_open() we don't return a disconnected connection from the shared hash, instead opening a new connection. We then insert the newly-opened connection into the hash, which should replace the old one.
However, in connection_forget_shared_unlocked() we assert() if the connection is not in the hash. The replaced/disconnected connection won't be in the hash by my reading of the code.
I think our connect/disconnect handling could really use a nice test case... maybe create the test bus, then have a client that tries opening various shared/private connections and on client exit do a dbus_shutdown() and check for leaks.
Version: 1.5