all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#65798] [PATCH gnome-team] Cogl: fix double free
@ 2023-09-07  5:36 Vivien Kraus via Guix-patches via
  2023-09-07  5:36 ` [bug#65798] [PATCH gnome-team v2] " Vivien Kraus via Guix-patches via
  0 siblings, 1 reply; 6+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-09-07  5:36 UTC (permalink / raw)
  To: 65798

* gnu/local.mk (dist_patch_DATA): Add cogl-fix-double-free.patch.
* gnu/packages/gnome.scm (cogl): Apply cogl-fix-double-free.patch.
* gnu/packages/patches/cogl-fix-double-free.patch: Avoid freeing the
dispaly used by a cogl context twice. Since the cogl repository is
read-only, this patch won’t be applied upstream.
---
 gnu/local.mk                                    |  1 +
 gnu/packages/gnome.scm                          |  4 +++-
 gnu/packages/patches/cogl-fix-double-free.patch | 12 ++++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/cogl-fix-double-free.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 24fa8117c6..ae36dd49c9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1024,6 +1024,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/clucene-pkgconfig.patch			\
   %D%/packages/patches/cmake-curl-certificates-3.24.patch	\
   %D%/packages/patches/coda-use-system-libs.patch		\
+  %D%/packages/patches/cogl-fix-double-free.patch		\
   %D%/packages/patches/collectd-5.11.0-noinstallvar.patch		\
   %D%/packages/patches/combinatorial-blas-awpm.patch		\
   %D%/packages/patches/combinatorial-blas-io-fix.patch		\
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 922d6ba24b..6b824c2832 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -6131,7 +6131,9 @@ (define-public cogl
                            (version-major+minor version) "/"
                            "cogl-" version ".tar.xz"))
        (sha256
-        (base32 "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8"))))
+        (base32 "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8"))
+       (patches
+        (search-patches "cogl-fix-double-free.patch"))))
     ;; NOTE: mutter exports a bundled fork of cogl, so when making changes to
     ;; cogl, corresponding changes may be appropriate in mutter as well.
     (build-system gnu-build-system)
diff --git a/gnu/packages/patches/cogl-fix-double-free.patch b/gnu/packages/patches/cogl-fix-double-free.patch
new file mode 100644
index 0000000000..67391f6300
--- /dev/null
+++ b/gnu/packages/patches/cogl-fix-double-free.patch
@@ -0,0 +1,12 @@
+diff --git a/cogl-1.22.8/cogl/cogl-context.c b/cogl-1.22.8-fixed/cogl/cogl-context.c
+index a7eed29..2280942 100644
+--- a/cogl/cogl-context.c
++++ b/cogl/cogl-context.c
+@@ -219,6 +219,7 @@ cogl_context_new (CoglDisplay *display,
+     }
+ 
+   context->display = display;
++  cogl_object_ref (display);
+ 
+   /* This is duplicated data, but it's much more convenient to have
+      the driver attached to the context and the value is accessed a

base-commit: baf5b0745446dabe8166d860996dc54cfa09db3e
-- 
2.41.0




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-15 16:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-07  5:36 [bug#65798] [PATCH gnome-team] Cogl: fix double free Vivien Kraus via Guix-patches via
2023-09-07  5:36 ` [bug#65798] [PATCH gnome-team v2] " Vivien Kraus via Guix-patches via
2023-09-08  4:24   ` Liliana Marie Prikler
2023-09-07  5:36     ` [bug#65798] [gnome-team v3] " Vivien Kraus via Guix-patches via
2023-09-08 16:59       ` Liliana Marie Prikler
2023-09-15 16:17         ` bug#65798: " Liliana Marie Prikler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.