From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 4PdeCsKs+mRHhAAA9RJhRA:P1 (envelope-from ) for ; Fri, 08 Sep 2023 07:10:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4PdeCsKs+mRHhAAA9RJhRA (envelope-from ) for ; Fri, 08 Sep 2023 07:10:26 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 91CFC60A1E for ; Fri, 8 Sep 2023 07:10:25 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniA header.b="p edUMtk"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694149826; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IS90N+SdX8tFFwp8+gVwFEZbL1VPXZmGA+NbU5zF6Yk=; b=EyfsqkePeSod+av+Z37t8KwyibJeS/9naxVIdm4EawwGK1qNrOAeJiUwC1MuQGuzrEBDK6 w+m3TyCFqeIpXYZ+N7VfmcIUkPoiBiPkcATa6skpVT/ulgjEJKztgnTQt5knhNjFBcAD8M IWdpvRSiDXtvv7gKkvgpBTu1s1Ze0/gPoDipzFw+b2gqa3zINKOmU9bDd+WmJ4cFxXjQ09 Gz+wvWNaFfG1hGNjY5aYgrR66Sasu1t+py5n0mQDbBbZg8zvqoxCdICB06Nj15nhtttHzS mhcvLdtAMriwBNm8ZMDJorpY9BqbkztLzP2G3rhmMFr0zd3sap5XcT5NCQUemw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694149826; a=rsa-sha256; cv=none; b=MMllI5S2SAD+L9lO85XCuDwcq58TuaB8GcRy4xyt2QrTL3u+tvMm9rV2KGNLQoRIebbmy+ q9U0GK6yqh71ObDz8sw0CHn+xkLKEIXyQBaBqe9ejwmKpxZQusMU9qFAZ9v1jo/B6iruCY Jjg2HwPeUee4wASLY3e5Pr62ZdkSxgLJOInrOyf0i4q8zj0EtLBR6YuwlYUh3bEZneeeen GBpch7c/aSSAcFj1GFzpHpizzP18u3hE5qkm+7YfgeO41b0bF5z4rkZ+ElWiXVeekWLmcb VY4qGjQ/ipOEZC5fRvhIrq5I8jqKPrTMEG+8Q9ooTiiU+EcxMVTaPKaOcr9G1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniA header.b="p edUMtk"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeTks-0003Kj-Ci; Fri, 08 Sep 2023 01:10:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeTkm-0003Jc-8y for guix-patches@gnu.org; Fri, 08 Sep 2023 01:10:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeTkm-0005fk-0h for guix-patches@gnu.org; Fri, 08 Sep 2023 01:10:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeTkn-0000d7-SK for guix-patches@gnu.org; Fri, 08 Sep 2023 01:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65798] [gnome-team v3] Cogl: fix double free Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Sep 2023 05:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65798 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65798@debbugs.gnu.org Cc: rg@raghavgururajan.name, liliana.prikler@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 65798-submit@debbugs.gnu.org id=B65798.16941497552337 (code B ref 65798); Fri, 08 Sep 2023 05:10:01 +0000 Received: (at 65798) by debbugs.gnu.org; 8 Sep 2023 05:09:15 +0000 Received: from localhost ([127.0.0.1]:41914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeTk2-0000bd-T6 for submit@debbugs.gnu.org; Fri, 08 Sep 2023 01:09:15 -0400 Received: from planete-kraus.eu ([89.234.140.182]:36332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeTjz-0000bT-L1 for 65798@debbugs.gnu.org; Fri, 08 Sep 2023 01:09:13 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id c061f4da; Fri, 8 Sep 2023 05:09:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniA; bh=iR+LbM6R4SimH1IqGv4zp0GKbxw=; b=p edUMtkKdvXsxWdlLAl+J5sLuAxX/1oJ7Bh4zHy/H7404DORObR3FWrT3vXlGvFwh DRv1WljLTSSMlImVh8ezmyiPzP2SGYzPibj0KTBTo7NZogfB4xbp8JKgOHvZTShY 0M9Za+gb41ezb7lk8sy1apjRIcvQMJsBJb3A+9/2DvvJRKGEc/UALzrWzxf0yo7e gqQwoNNrLl8dfa2g3z6nfhwNuDOwfZglE5PVo+gAC1DuBJUHCcQDRDUkk08Gv0Bj fviuUpCKPFITGEMAWp9tYZeYoqvwlIUzN4K0IpQKfaCQHK60fcur155tyfvlew/u +wL5p80ZtVLMiiCyIPJ0w== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 260be9c5 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 8 Sep 2023 05:09:07 +0000 (UTC) Message-ID: In-Reply-To: References: Date: Thu, 7 Sep 2023 07:36:31 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.46.4 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches From: Vivien Kraus via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -3.73 X-Spam-Score: -3.73 X-Migadu-Queue-Id: 91CFC60A1E X-TUID: DK4IJ0MEmXKH * gnu/packages/patches/cogl-fix-double-free.patch: Avoid freeing the dispaly used by a cogl context twice. * gnu/local.mk (dist_patch_DATA): Add cogl-fix-double-free.patch. * gnu/packages/gnome.scm (cogl): Apply cogl-fix-double-free.patch. Remove the comment about the changes to be reflected in mutter, as their bundled cogl has diverged far enough. --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 6 ++-- .../patches/cogl-fix-double-free.patch | 32 +++++++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) 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..894aac8202 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -6131,9 +6131,9 @@ (define-public cogl (version-major+minor version) "/" "cogl-" version ".tar.xz")) (sha256 - (base32 "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8")))) - ;; NOTE: mutter exports a bundled fork of cogl, so when making changes to - ;; cogl, corresponding changes may be appropriate in mutter as well. + (base32 "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8")) + (patches + (search-patches "cogl-fix-double-free.patch")))) (build-system gnu-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-mkenums 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..e7a994b33a --- /dev/null +++ b/gnu/packages/patches/cogl-fix-double-free.patch @@ -0,0 +1,32 @@ +From 15d0f7d96cf53263196e26f2eb48ededdff0efeb Mon Sep 17 00:00:00 2001 +Message-ID: <15d0f7d96cf53263196e26f2eb48ededdff0efeb.1694148833.git.vivien@planete-kraus.eu> +From: Vivien Kraus +Date: Thu, 7 Sep 2023 22:16:48 +0200 +Subject: [PATCH] Prevent double free on context objects + +The display is unrefed in the context destructor, but not refed in the +constructor. + +This targets an archived (read-only) repository. +--- + cogl/cogl-context.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c +index a7eed29a..7cdc9fe7 100644 +--- a/cogl/cogl-context.c ++++ b/cogl/cogl-context.c +@@ -218,7 +218,7 @@ cogl_context_new (CoglDisplay *display, + return NULL; + } + +- context->display = display; ++ context->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: 61d966c7442d521e38572b7f93ac7b8973a9c65e +-- +2.41.0 + base-commit: baf5b0745446dabe8166d860996dc54cfa09db3e -- 2.41.0