From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id flcLOBkz+mSSSgAAauVa8A:P1 (envelope-from ) for ; Thu, 07 Sep 2023 22:31:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id flcLOBkz+mSSSgAAauVa8A (envelope-from ) for ; Thu, 07 Sep 2023 22:31:22 +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 9501E45796 for ; Thu, 7 Sep 2023 22:31:21 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniA header.b=H0oXZnLh; 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=1694118681; 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: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=MrFrtBhEQwoL57gojZsB6anBLY+oGIcMvLgmrtYtqYQ=; b=Xhjz4Mgj59UlRv0OdjpYGG5OvNTzQnGrq6VL926kkK6jS8auUY27vW2vbdkBofbYl+gLyP jeeik6gZY4i3V3kVHJtUS/oAemiIjBNdxrvc6pt/4UChsmX08+tl8PpP8PQUuJFWTKMsYK +TNmse0WZKh+PKIvKUtvjYBfBh/zovu5rf62sd75Jw3v6IGVesGxlE1UeyUg82vCNHfiPZ kCs5/pHnHfOtfPSBNTHrB3Z25yZc/o9pocdKJrFqqwsZF1VhwT/37F5PLNQAyu7bsSMkP2 /FXQwjL60Wt+w1qfrenNDTyHwKJw0g3kaQN1M2Q7QNe0OMDKQn/qCsMYcJsvBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniA header.b=H0oXZnLh; 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-Seal: i=1; s=key1; d=yhetil.org; t=1694118681; a=rsa-sha256; cv=none; b=OW2tgDsFiY4HQD6ar7CtdO0/UL4jWYGRDAADDCl1T9ryJ1RFszCCMcShHY9XTK3Q+c5sYG ViB9aWMjb/6bZEbdEkJSyFGI1pDv8dg9aD46X0giQ6kV93Ve9F7nWoyBNG/9M4xMSf4B8c /HJ5mADua4z9dLL1MYmS873VuYi0vM7LmlpVpzyvWoH6CP/0rtUBX7kRIXKuBzYrgMSt4/ miYf4y2SI2ZlhG4QHWT8GOUCR3SE81STHYt75umCzlZIHEPO1T08qdWM0RPbId8Ia2/e/n GulVeQA0hrfX+OxGCnyt/Z9z/jJeRaIMxi+HVMAYH/rSEqXVP1kTYx+kCzusow== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeLea-0007gM-JW; Thu, 07 Sep 2023 16:31:04 -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 1qeLeW-0007du-Ks for guix-patches@gnu.org; Thu, 07 Sep 2023 16:31:02 -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 1qeLeW-0006yw-C5 for guix-patches@gnu.org; Thu, 07 Sep 2023 16:31:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeLeY-0006if-5B for guix-patches@gnu.org; Thu, 07 Sep 2023 16:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65798] [PATCH gnome-team v2] Cogl: fix double free References: <03afaf481dfe74a9de14c77febf5d9241d0010e7.camel@planete-kraus.eu> In-Reply-To: <03afaf481dfe74a9de14c77febf5d9241d0010e7.camel@planete-kraus.eu> Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Sep 2023 20:31:02 +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.169411863025789 (code B ref 65798); Thu, 07 Sep 2023 20:31:02 +0000 Received: (at 65798) by debbugs.gnu.org; 7 Sep 2023 20:30:30 +0000 Received: from localhost ([127.0.0.1]:41478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeLe2-0006ht-2e for submit@debbugs.gnu.org; Thu, 07 Sep 2023 16:30:30 -0400 Received: from planete-kraus.eu ([89.234.140.182]:45220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeLdz-0006hj-AN for 65798@debbugs.gnu.org; Thu, 07 Sep 2023 16:30:28 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 18ce9c06; Thu, 7 Sep 2023 20:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:from:date:subject:mime-version:content-type :content-transfer-encoding:to:cc; s=albinoniA; bh=xtHwQxAEhFInu5 jvBG+8tGYc2+o=; b=H0oXZnLhnwWJxRpCuK6bMt9/Q9wpQRlpg8Q2YnB+bEdmDB qlKdYA3KNPj3/gjQpL8PziwM1QVR4OHw/LRzklq9o3lN0W8+ckJLx5z1FXfdWhxW swyG4Kk9fjMXipiHa1MA1vENVWV71jrNn9s/6LuJ4soGBUD2S/O99wkmBIb2bbzI LtwN3dsNl7aFGrTE9bQx4uA+4c0XHDgiXrfr5rATT8T3Y85fjQ63Pcyh1wLijZFB iQ1UXZW/IuE/klueJ4gf+6ZStPyYrZXt30o1KTEGFt/pktIqckwS++YcGk/k39UO s+JkGTHIUV5KPYFDmE+7Zhsce0Llj7ErdMYtiakw== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 5339c475 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 7 Sep 2023 20:30:23 +0000 (UTC) Message-ID: <018c75fd44fa1b1462a49f5bf700b9194d9c6341.1694118524.git.vivien@planete-kraus.eu> Date: Thu, 7 Sep 2023 07:36:31 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 9501E45796 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -5.23 X-Spam-Score: -5.23 X-TUID: LXdkvYM+h2gR * 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 ++- .../patches/cogl-fix-double-free.patch | 31 +++++++++++++++++++ 3 files changed, 35 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..7094c4cf02 --- /dev/null +++ b/gnu/packages/patches/cogl-fix-double-free.patch @@ -0,0 +1,31 @@ +From 38d3fda8849ac327b473ac11dfac5499f595b7ac Mon Sep 17 00:00:00 2001 +Message-ID: <38d3fda8849ac327b473ac11dfac5499f595b7ac.1694118000.git.vivien@planete-kraus.eu> +In-Reply-To: +References: +From: Vivien Kraus +Date: Thu, 7 Sep 2023 22:16:48 +0200 +Subject: [PATCH 1/1] 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 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c +index a7eed29a..22809424 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 +-- +2.41.0 + base-commit: baf5b0745446dabe8166d860996dc54cfa09db3e -- 2.41.0