Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for a double-free in Gio-DBus
The docs for g_dbus_proxy_get_interface_info() say "Do not unref the returned object, it is owned by proxy". However, this function's return value is not correctly annotated as transfer=none. This causes a double-free at runtime, because lgi frees a reference that it never owned. Because we cannot query the reference count, this test does not actually test much. If it causes a segfault, then the test failed. This is bad behaviour for a test, but seems to be the best that we can do. This test uses Gio.TestDBus to create a local dbus daemon. This in turn causes problems, because it has to make sure everything referencing that dbus daemon is finalized before TestDBus is torn down. The implementation is careful to trigger a GC cycle where needed to handle this. Signed-off-by: Uli Schlachter <psychon@znc.in>
- Loading branch information