summaryrefslogtreecommitdiff
path: root/dev-python/dbus-next/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-python/dbus-next/files
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-python/dbus-next/files')
-rw-r--r--dev-python/dbus-next/files/dbus-next-0.2.3-glib-crash.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/dev-python/dbus-next/files/dbus-next-0.2.3-glib-crash.patch b/dev-python/dbus-next/files/dbus-next-0.2.3-glib-crash.patch
new file mode 100644
index 000000000000..714d733f3689
--- /dev/null
+++ b/dev-python/dbus-next/files/dbus-next-0.2.3-glib-crash.patch
@@ -0,0 +1,33 @@
+https://github.com/altdesktop/python-dbus-next/pull/114
+https://github.com/altdesktop/python-dbus-next/issues/113
+https://gitlab.gnome.org/GNOME/pygobject/-/issues/525
+
+From 445bc2cd0df80e36154e45ea3c4f268b550890b5 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 22 Mar 2022 22:11:01 +1000
+Subject: [PATCH] glib: destroy the _AuthLineSource explicitly
+
+See https://gitlab.gnome.org/GNOME/pygobject/-/issues/525 for an
+explanation, the summary is: we need to explicitly call source.destroy()
+if dispatch returns GLib.SOURCE_REMOVE.
+
+Deleting the source by resetting it to None causes invalid memory
+accesses and eventual crashes.
+
+This can be reproduced with a basic call to
+ bus = dbus_next.glib.MessageBus(bus_type=dbus_next.BusType.SESSION).connect_sync()
+and a GLib.MainLoop() after this call. Run in valgrind --tool=memcheck.
+
+Fixes #113
+--- a/dbus_next/glib/message_bus.py
++++ b/dbus_next/glib/message_bus.py
+@@ -457,7 +457,7 @@ def line_notify(line):
+ self._stream.write(Authenticator._format_line(resp))
+ self._stream.flush()
+ if resp == 'BEGIN':
+- self._readline_source = None
++ self._readline_source.destroy()
+ authenticate_notify(None)
+ return True
+ except Exception as e:
+