summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch
diff options
context:
space:
mode:
authorDaniel Gomez <daniel@qtec.com>2020-04-03 09:20:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-05 11:46:38 +0100
commit5cd71814ac1f747d6ae858ffb104c571b57b25fd (patch)
tree294e26b11e5d8a94e249e305e301bf3bcdd5c6fd /meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch
parentac39c11d4988ced28a8d549068e2e870b4ad90d6 (diff)
downloadpoky-5cd71814ac1f747d6ae858ffb104c571b57b25fd.tar.gz
glib-2.0: Backport GMainContext fixes
Backport fixes introduced in 2.63.6 for memory leaks and memory corruption in GMainContext Upstream merge: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1353 Fixes SIGSEGV in GStreamer: Thread 2 "multihandlesink" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff6bb9700 (LWP 18045)] 0x00007ffff7d65992 in g_source_unref_internal (source=0x7ffff00047d0, context=0x55555561c800, have_lock=1) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:2146 2146 ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c: No such file or directory. (gdb) bt #0 0x00007ffff7d65992 in g_source_unref_internal (source=0x7ffff00047d0, context=0x55555561c800, have_lock=1) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:2146 #1 0x00007ffff7d65bb6 in g_source_iter_next (iter=iter@entry=0x7ffff6bb8db0, source=source@entry=0x7ffff6bb8da8) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:980 #2 0x00007ffff7d67ef3 in g_main_context_prepare (context=context@entry=0x55555561c800, priority=priority@entry=0x7ffff6bb8e30) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:944 #3 0x00007ffff7d6896b in g_main_context_iterate (context=context@entry=0x55555561c800, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:3900 #4 0x00007ffff7d68b4c in g_main_context_iteration (context=0x55555561c800, may_block=may_block@entry=1) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:3981 #5 0x00007ffff6be4482 in gst_multi_socket_sink_thread (mhsink=0x555555679ab0 [GstMultiSocketSink]) at ../../../gst-plugins-base-1.14.4/gst/tcp/gstmultisocketsink.c:1164 #6 0x00007ffff7d8fb35 in g_thread_proxy (data=0x55555565c770) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gthread.c:784 #7 0x00007ffff7841ebd in start_thread (arg=<optimized out>) at pthread_create.c:486 #8 0x00007ffff7aa12bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 #8 0x00007ffff7aa12bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 (From OE-Core rev: 62eb45e6455df99b0c8b61bfb90858bb656bd724) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch b/meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch
new file mode 100644
index 0000000000..4c9e9f5182
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch
@@ -0,0 +1,36 @@
1From 3e9d85f1b75e2b1096d9643563d7d17380752fc7 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
3Date: Tue, 11 Feb 2020 09:34:38 +0200
4Subject: [PATCH] GMainContext - Move mutex unlocking in destructor right
5 before freeing the mutex
6
7This does not have any behaviour changes but is cleaner. The mutex is
8only unlocked now after all operations on the context are done and right
9before freeing the mutex and the context itself.
10
11Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/730a75fc8e8271c38fbd5363d1f77a00876b9ddc]
12
13---
14 glib/gmain.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/glib/gmain.c b/glib/gmain.c
18index 10ba2f8..b1df470 100644
19--- a/glib/gmain.c
20+++ b/glib/gmain.c
21@@ -584,7 +584,6 @@ g_main_context_unref (GMainContext *context)
22 source = s_iter->data;
23 g_source_destroy_internal (source, context, TRUE);
24 }
25- UNLOCK_CONTEXT (context);
26
27 for (sl_iter = context->source_lists; sl_iter; sl_iter = sl_iter->next)
28 {
29@@ -595,6 +594,7 @@ g_main_context_unref (GMainContext *context)
30
31 g_hash_table_destroy (context->sources);
32
33+ UNLOCK_CONTEXT (context);
34 g_mutex_clear (&context->mutex);
35
36 g_ptr_array_free (context->pending_dispatches, TRUE);