To reproduce:
- create a proxy factory
- duplicate it
- free both the original and the duplicate
Expected result: no runtime errors
Actual result: Whichever proxy factory is freed first is freed successfully, destroying the underlying proxy manager. Now the other proxy factory has a dangling pointer to a freed proxy manager. When the second proxy factory is freed, GLib will make an attempt to throw a critical warning:
not ok /libproxy/dup - GLib-GObject-FATAL-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
but this is undefined behaviour, so it might equally well just crash.
To reproduce:
Expected result: no runtime errors
Actual result: Whichever proxy factory is freed first is freed successfully, destroying the underlying proxy manager. Now the other proxy factory has a dangling pointer to a freed proxy manager. When the second proxy factory is freed, GLib will make an attempt to throw a critical warning:
but this is undefined behaviour, so it might equally well just crash.