From 102ee748fa0d19e2323243f6857a95d9785d5135b14b40aca9a2a614c461520b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 7 Mar 2020 21:56:31 +0000 Subject: [PATCH] Accepting request 781707 from home:AZhou:branches:GNOME:Factory - Add tracker-fix-segfault-in-writeback.patch: Check if argument is NULL before using it and dispose connection and data_manager before shutting down writeback and events to prevent segmentation fault (bsc#1165357, glgo#GNOME/tracker!192). OBS-URL: https://build.opensuse.org/request/show/781707 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/tracker?expand=0&rev=191 --- tracker-fix-segfault-in-writeback.patch | 33 +++++++++++++++++++++++++ tracker.changes | 8 ++++++ tracker.spec | 4 ++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tracker-fix-segfault-in-writeback.patch diff --git a/tracker-fix-segfault-in-writeback.patch b/tracker-fix-segfault-in-writeback.patch new file mode 100644 index 0000000..bd9df47 --- /dev/null +++ b/tracker-fix-segfault-in-writeback.patch @@ -0,0 +1,33 @@ +diff --git a/src/tracker-store/tracker-main.vala b/src/tracker-store/tracker-main.vala +index 1e8d1ddd2..0db9b6653 100644 +--- a/src/tracker-store/tracker-main.vala ++++ b/src/tracker-store/tracker-main.vala +@@ -368,12 +368,12 @@ License which can be viewed at: + + message ("Cleaning up"); + ++ data_manager = null; ++ connection = null; ++ + /* Shutdown major subsystems */ + Tracker.Writeback.shutdown (); + Tracker.Events.shutdown (); +- +- data_manager = null; +- connection = null; + Tracker.DBus.shutdown (); + Tracker.Log.shutdown (); + +diff --git a/src/tracker-store/tracker-writeback.c b/src/tracker-store/tracker-writeback.c +index 32517d553..fde45afc0 100644 +--- a/src/tracker-store/tracker-writeback.c ++++ b/src/tracker-store/tracker-writeback.c +@@ -200,6 +200,8 @@ tracker_writeback_transact (void) + GHashTableIter iter; + gpointer key, value; + ++ g_return_if_fail (private == NULL); ++ + if (!private->pending_events) + return; + diff --git a/tracker.changes b/tracker.changes index 980ce5e..c95cf1f 100644 --- a/tracker.changes +++ b/tracker.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Mar 5 02:41:37 UTC 2020 - Alynx Zhou + +- Add tracker-fix-segfault-in-writeback.patch: Check if argument is + NULL before using it and dispose connection and data_manager + before shutting down writeback and events to prevent segmentation + fault (bsc#1165357, glgo#GNOME/tracker!192). + ------------------------------------------------------------------- Tue Feb 18 23:39:08 UTC 2020 - Bjørn Lie diff --git a/tracker.spec b/tracker.spec index 6259038..89b6fad 100644 --- a/tracker.spec +++ b/tracker.spec @@ -1,7 +1,7 @@ # # spec file for package tracker # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2010 Luis Medinas, Portugal # # All modifications and additions to the file contributed by third parties @@ -28,6 +28,8 @@ License: GPL-2.0-or-later Group: Productivity/Other URL: https://wiki.gnome.org/Projects/Tracker Source0: https://download.gnome.org/sources/tracker/2.3/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM tracker-fix-segfault-in-writeback.patch bsc#1165357 glgo#GNOME/tracker!192 alynx.zhou@suse.com -- Fix tracker segmentation fault in writeback +Patch0: tracker-fix-segfault-in-writeback.patch BuildRequires: fdupes BuildRequires: gcc-c++