Accepting request 782594 from 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/782594
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tracker?expand=0&rev=126
This commit is contained in:
Dominique Leuenberger 2020-03-11 17:32:53 +00:00 committed by Git OBS Bridge
commit cabbc12031
3 changed files with 44 additions and 1 deletions

View File

@ -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;

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Mar 5 02:41:37 UTC 2020 - Alynx Zhou <alynx.zhou@suse.com>
- 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 <bjorn.lie@gmail.com>

View File

@ -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++