From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 27B55158023 for ; Fri, 16 Dec 2022 02:52:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E0D38E07D8; Fri, 16 Dec 2022 02:52:17 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9EC75E07D8 for ; Fri, 16 Dec 2022 02:52:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6996E340E91 for ; Fri, 16 Dec 2022 02:52:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 82983780 for ; Fri, 16 Dec 2022 02:52:14 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1671159124.67eefb25d66a312e6d4ecdf3ff6bb4c7f4847137.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/colord/, x11-misc/colord/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-misc/colord/colord-1.4.6-r1.ebuild x11-misc/colord/colord-1.4.6.ebuild x11-misc/colord/files/colord-1.4.6-lcms2-corruption.patch X-VCS-Directories: x11-misc/colord/files/ x11-misc/colord/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 67eefb25d66a312e6d4ecdf3ff6bb4c7f4847137 X-VCS-Branch: master Date: Fri, 16 Dec 2022 02:52:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7d9c138d-aca1-4a61-843c-396106b72b76 X-Archives-Hash: 8fc3570d14daad382afc66daccc2a9fd commit: 67eefb25d66a312e6d4ecdf3ff6bb4c7f4847137 Author: Sam James gentoo org> AuthorDate: Fri Dec 16 02:16:12 2022 +0000 Commit: Sam James gentoo org> CommitDate: Fri Dec 16 02:52:04 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67eefb25 x11-misc/colord: backport lcms 2 fix Closes: https://bugs.gentoo.org/880865 Signed-off-by: Sam James gentoo.org> ...{colord-1.4.6.ebuild => colord-1.4.6-r1.ebuild} | 4 +++ .../files/colord-1.4.6-lcms2-corruption.patch | 33 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/x11-misc/colord/colord-1.4.6.ebuild b/x11-misc/colord/colord-1.4.6-r1.ebuild similarity index 98% rename from x11-misc/colord/colord-1.4.6.ebuild rename to x11-misc/colord/colord-1.4.6-r1.ebuild index 6b1521b25a0a..58918a6d770d 100644 --- a/x11-misc/colord/colord-1.4.6.ebuild +++ b/x11-misc/colord/colord-1.4.6-r1.ebuild @@ -57,6 +57,10 @@ BDEPEND=" vala? ( $(vala_depend) ) " +PATCHES=( + "${FILESDIR}"/${P}-lcms2-corruption.patch +) + src_prepare() { default use vala && vala_src_prepare diff --git a/x11-misc/colord/files/colord-1.4.6-lcms2-corruption.patch b/x11-misc/colord/files/colord-1.4.6-lcms2-corruption.patch new file mode 100644 index 000000000000..4df6773cfb4b --- /dev/null +++ b/x11-misc/colord/files/colord-1.4.6-lcms2-corruption.patch @@ -0,0 +1,33 @@ +https://bugs.gentoo.org/880865 + +https://github.com/mm2/Little-CMS/issues/344 +https://github.com/hughsie/colord/issues/145 + +https://github.com/hughsie/colord/commit/91a3cc2e994be587def3b70762f15461101d43a1 + +From 91a3cc2e994be587def3b70762f15461101d43a1 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Tue, 15 Nov 2022 17:03:37 +0000 +Subject: [PATCH] lib: avoid destructing LCMS plugin twice with lcms 2.14 + +lcms 2.14 contains a change to avoid a memory leak, but that change +assumes correct API usage. It's not necessary to both cmsUnregisterPluginsTHR() +and then cmsDeleteContext() -- we can just straight up delete the LCMS +context instead (cmsDeleteContext()). + +So, follow upstream's suggestion & do that. This fixes memory corruption +when building colord on x86, for example. + +Bug: https://github.com/mm2/Little-CMS/issues/344 +Fixes: https://github.com/hughsie/colord/issues/145 +Signed-off-by: Sam James +--- a/lib/colord/cd-context-lcms.c ++++ b/lib/colord/cd-context-lcms.c +@@ -163,7 +163,6 @@ cd_context_lcms_free (gpointer ctx) + g_clear_error (error_ctx); + g_free (error_ctx); + +- cmsUnregisterPluginsTHR (ctx); + cmsDeleteContext (ctx); + } +