From owner-dev-commits-ports-all@freebsd.org Tue Apr 20 22:49:55 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAA985EBFF1; Tue, 20 Apr 2021 22:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPzQq5Mjlz3qXS; Tue, 20 Apr 2021 22:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA17A1B2AC; Tue, 20 Apr 2021 22:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13KMntfH090979; Tue, 20 Apr 2021 22:49:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13KMnt6I090978; Tue, 20 Apr 2021 22:49:55 GMT (envelope-from git) Date: Tue, 20 Apr 2021 22:49:55 GMT Message-Id: <202104202249.13KMnt6I090978@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Adriaan de Groot Subject: git: d7bd94998c03 - 2021Q2 - graphics/spectacle: avoid crash with export-plugins MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adridg X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q2 X-Git-Reftype: branch X-Git-Commit: d7bd94998c03f8c14d58b4f462ea8d58a00f5ee6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 22:49:55 -0000 The branch 2021Q2 has been updated by adridg: URL: https://cgit.FreeBSD.org/ports/commit/?id=d7bd94998c03f8c14d58b4f462ea8d58a00f5ee6 commit d7bd94998c03f8c14d58b4f462ea8d58a00f5ee6 Author: Adriaan de Groot AuthorDate: 2021-04-20 14:23:01 +0000 Commit: Adriaan de Groot CommitDate: 2021-04-20 22:49:35 +0000 graphics/spectacle: avoid crash with export-plugins This is upstream MR https://invent.kde.org/graphics/spectacle/-/merge_requests/61 and avoids crashes when clicking almost any entry in the *export* menu. PR: 252313 --- graphics/spectacle/Makefile | 1 + ...t-f123cf6b1b67519a1a4e82e69764da9e89716489.diff | 52 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/graphics/spectacle/Makefile b/graphics/spectacle/Makefile index 5d091220bf64..d1fb10e3cfa4 100644 --- a/graphics/spectacle/Makefile +++ b/graphics/spectacle/Makefile @@ -1,6 +1,7 @@ PORTNAME= spectacle DISTVERSION= ${KDE_APPLICATIONS_VERSION} +PORTREVISION= 1 CATEGORIES= graphics kde kde-applications MAINTAINER= kde@FreeBSD.org diff --git a/graphics/spectacle/files/patch-git-f123cf6b1b67519a1a4e82e69764da9e89716489.diff b/graphics/spectacle/files/patch-git-f123cf6b1b67519a1a4e82e69764da9e89716489.diff new file mode 100644 index 000000000000..379a3e90b1ed --- /dev/null +++ b/graphics/spectacle/files/patch-git-f123cf6b1b67519a1a4e82e69764da9e89716489.diff @@ -0,0 +1,52 @@ +commit f123cf6b1b67519a1a4e82e69764da9e89716489 +Author: Adriaan de Groot +Date: Tue Apr 20 14:28:33 2021 +0200 + + Fix crash in all(?) KIPI export plugins + + Scenario: + - start spectacle, take a screenshot, click *export* drop-down + and pick *imageshack* or *remote storage* (or most of the + others) + - spectacle crashes + + Valgrind: + ==60783== Invalid read of size 8 + ==60783== at 0x48A149A: KIPI::PluginLoader::interface() const (invent/libkipi/src/pluginloader.cpp:385) + ==60783== by 0x14DB111A: KIPIRemoteStoragePlugin::Plugin_RemoteStorage::slotActivateExport() (invent/kipi-plugins/remotestorage/plugin_remotestorage.cpp:122) + ==60783== Address 0xc6d28b0 is 16 bytes inside a block of size 24 free'd + ==60783== at 0x484CBAC: operator delete(void*) (in /usr/local/lib/valgrind/vgpreload_memcheck-amd64-freebsd.so) + ==60783== by 0x247CAB: ExportMenu::getKipiItems() (invent/spectacle/src/Gui/ExportMenu.cpp:164) +diff --git src/Gui/ExportMenu.cpp src/Gui/ExportMenu.cpp +index 66490dc..92eafa0 100644 +--- src/Gui/ExportMenu.cpp ++++ src/Gui/ExportMenu.cpp +@@ -120,7 +120,19 @@ void ExportMenu::getKipiItems() + mKipiMenu->clear(); + + mKipiInterface = new KSGKipiInterface(this); +- KIPI::PluginLoader *loader = new KIPI::PluginLoader; ++ ++ KIPI::PluginLoader *loader = KIPI::PluginLoader::instance(); ++ if (!loader) ++ { ++ // The loader needs to live at least as long as the plugins ++ // loaded through it, since the plugins use the loader's ++ // interface() call to get the KIPI interface they conform to. ++ // ++ // ASAN may complain about a leak here, because this loader ++ // pointer goes out of scope, but it is kept around in ++ // the PluginLoader's static instance() ++ loader = new KIPI::PluginLoader; ++ } + + loader->setInterface(mKipiInterface); + loader->init(); +@@ -161,7 +173,6 @@ void ExportMenu::getKipiItems() + if (mKipiMenu->isEmpty()) { + mKipiMenu->addAction(i18n("No KIPI plugins available"))->setEnabled(false); + } +- delete loader; + } + #endif +