Package: release.debian.org
Severity: normal
Tags: bullseye moreinfo
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: Paul Wise <p...@debian.org>

  - Fixes crash due to not unreferencing threads (see LP#1876744)
https://bugs.launchpad.net/foxtrotgps/+bug/1876744

The only difference between the packages in bullseye and bookworm
is that bookworm contains a fix for a regression that was introduced
in bullseye.

Paul, please ACK/NAK whether you as maintainer consider this appropriate.
diff -Nru foxtrotgps-1.2.2+bzr330/changelog/ChangeLog 
foxtrotgps-1.2.2+bzr331/changelog/ChangeLog
--- foxtrotgps-1.2.2+bzr330/changelog/ChangeLog 2021-07-14 02:44:15.000000000 
+0300
+++ foxtrotgps-1.2.2+bzr331/changelog/ChangeLog 2021-08-17 15:19:23.000000000 
+0300
@@ -1,4 +1,24 @@
 ------------------------------------------------------------
+revno: 331
+fixes bug: https://launchpad.net/bugs/1876744
+author: Jesse Gardner <jgardner7...@protonmail.com>
+committer: Paul Wise <pa...@bonedaddy.net>
+branch nick: foxtrotgps
+timestamp: Mon 2021-08-16 23:01:48 -0700
+message:
+  Added g_thread_unref wherever g_thead_new is used
+
+  Fixes:
+  https://bazaar.launchpad.net/~foxtrotgps-team/foxtrotgps/trunk/revision/315
+  Cleanup-by: Paul Wise <pa...@bonedaddy.net>
+modified:
+  src/friends.c
+  src/geo_photos.c
+  src/gps_functions.c
+  src/hrm_functions.c
+  src/tile_management.c
+  src/tracks.c
+------------------------------------------------------------
 revno: 330
 committer: Paul Wise <pa...@bonedaddy.net>
 branch nick: bzr
diff -Nru foxtrotgps-1.2.2+bzr330/debian/changelog 
foxtrotgps-1.2.2+bzr331/debian/changelog
--- foxtrotgps-1.2.2+bzr330/debian/changelog    2021-07-14 02:58:30.000000000 
+0300
+++ foxtrotgps-1.2.2+bzr331/debian/changelog    2022-08-25 19:15:51.000000000 
+0300
@@ -1,3 +1,17 @@
+foxtrotgps (1.2.2+bzr331-1~deb11u1) bullseye; urgency=medium
+
+  * Non-maintainer upload.
+  * Rebuild for bullseye.
+
+ -- Adrian Bunk <b...@debian.org>  Thu, 25 Aug 2022 19:15:51 +0300
+
+foxtrotgps (1.2.2+bzr331-1) unstable; urgency=medium
+
+  * New upstream snapshot.
+    - Fixes crash due to not unreferencing threads (see LP#1876744)
+
+ -- Paul Wise <p...@debian.org>  Tue, 17 Aug 2021 20:24:50 +0800
+
 foxtrotgps (1.2.2+bzr330-1) unstable; urgency=medium
 
   * New upstream snapshot.
diff -Nru foxtrotgps-1.2.2+bzr330/src/friends.c 
foxtrotgps-1.2.2+bzr331/src/friends.c
--- foxtrotgps-1.2.2+bzr330/src/friends.c       2021-04-26 07:33:42.000000000 
+0300
+++ foxtrotgps-1.2.2+bzr331/src/friends.c       2021-08-17 09:01:48.000000000 
+0300
@@ -104,7 +104,10 @@
        gtk_label_set_label (label_msg, _("Connecting..."));
 
 #if GLIB_CHECK_VERSION(2,34,0)
-       if (!g_thread_new("friends thread", &update_position_thread, (gpointer) 
NULL) != 0)
+       GThread *gt = g_thread_new("friends thread", &update_position_thread, 
(gpointer) NULL);
+       if (gt != 0)
+               g_thread_unref(gt);
+       else
 #else
        if (!g_thread_create(&update_position_thread, NULL, FALSE, NULL) != 0)
 #endif
@@ -473,7 +476,10 @@
        gtk_label_set_text (label_msg, _("Connecting..."));
 
 #if GLIB_CHECK_VERSION(2,34,0)
-       if (!g_thread_new("register nick thread", &register_nick_thread, 
(gpointer) NULL) != 0)
+       GThread *gt=g_thread_new("register nick thread", &register_nick_thread, 
(gpointer) NULL);
+       if (gt != 0)
+               g_thread_unref(gt);
+       else
 #else
        if (!g_thread_create(&register_nick_thread, NULL, FALSE, NULL) != 0)
 #endif
@@ -705,7 +711,10 @@
        postdata = create_msg_postdata(m);
 
 #if GLIB_CHECK_VERSION(2,34,0)
-       if (!g_thread_new("Mission thread", &thread_send_message, postdata) != 
0)
+       GThread *gt = g_thread_new("Mission thread", &thread_send_message, 
postdata);
+       if (gt != 0)
+               g_thread_unref(gt);
+       else
 #else
        if (!g_thread_create(&thread_send_message, postdata, FALSE, NULL) != 0)
 #endif
diff -Nru foxtrotgps-1.2.2+bzr330/src/geo_photos.c 
foxtrotgps-1.2.2+bzr331/src/geo_photos.c
--- foxtrotgps-1.2.2+bzr330/src/geo_photos.c    2021-04-26 07:33:42.000000000 
+0300
+++ foxtrotgps-1.2.2+bzr331/src/geo_photos.c    2021-08-17 09:01:48.000000000 
+0300
@@ -687,7 +687,7 @@
        gtk_widget_hide(dialog_photo_correlate);
 
 #if GLIB_CHECK_VERSION(2,34,0)
-       g_thread_new("geocode thread", geocode_thread, (gpointer) NULL);
+       g_thread_unref(g_thread_new("geocode thread", geocode_thread, 
(gpointer) NULL));
 #else
        g_thread_create(geocode_thread, NULL, FALSE, NULL);
 #endif
diff -Nru foxtrotgps-1.2.2+bzr330/src/gps_functions.c 
foxtrotgps-1.2.2+bzr331/src/gps_functions.c
--- foxtrotgps-1.2.2+bzr330/src/gps_functions.c 2021-04-26 07:33:42.000000000 
+0300
+++ foxtrotgps-1.2.2+bzr331/src/gps_functions.c 2021-08-17 09:01:48.000000000 
+0300
@@ -849,7 +849,7 @@
        }
 
 #if GLIB_CHECK_VERSION(2,34,0)
-       g_thread_new("gps thread", &get_gps_thread, (gpointer)NULL);
+       g_thread_unref(g_thread_new("gps thread", &get_gps_thread, 
(gpointer)NULL));
 #else
        g_thread_create(&get_gps_thread, NULL, FALSE, NULL);
 #endif
diff -Nru foxtrotgps-1.2.2+bzr330/src/hrm_functions.c 
foxtrotgps-1.2.2+bzr331/src/hrm_functions.c
--- foxtrotgps-1.2.2+bzr330/src/hrm_functions.c 2021-04-26 07:33:42.000000000 
+0300
+++ foxtrotgps-1.2.2+bzr331/src/hrm_functions.c 2021-08-17 09:01:48.000000000 
+0300
@@ -234,7 +234,7 @@
 {
 #ifdef HAVE_BLUEZ
 #if GLIB_CHECK_VERSION(2,34,0)
-       g_thread_new("get hrm thread", &get_hrm_data_thread, (gpointer) NULL);
+       g_thread_unref(g_thread_new("get hrm thread", &get_hrm_data_thread, 
(gpointer) NULL));
 #else
        g_thread_create(&get_hrm_data_thread, NULL, FALSE, NULL);
 #endif
diff -Nru foxtrotgps-1.2.2+bzr330/src/tile_management.c 
foxtrotgps-1.2.2+bzr331/src/tile_management.c
--- foxtrotgps-1.2.2+bzr330/src/tile_management.c       2021-04-26 
07:33:42.000000000 +0300
+++ foxtrotgps-1.2.2+bzr331/src/tile_management.c       2021-08-17 
09:01:48.000000000 +0300
@@ -218,7 +218,10 @@
                g_hash_table_insert(ht, key, &value);
 
 #if GLIB_CHECK_VERSION(2,34,0)
-               if (!g_thread_new("download thread", &dl_thread, (gpointer 
*)tile_data) != 0)
+               GThread *gt = g_thread_new("download thread", &dl_thread, 
(gpointer *)tile_data);
+               if (gt != 0)
+                       g_thread_unref(gt);
+               else
 #else
                if (!g_thread_create(&dl_thread, (void *)tile_data, FALSE, 
NULL) != 0)
 #endif
diff -Nru foxtrotgps-1.2.2+bzr330/src/tracks.c 
foxtrotgps-1.2.2+bzr331/src/tracks.c
--- foxtrotgps-1.2.2+bzr330/src/tracks.c        2021-04-26 07:33:42.000000000 
+0300
+++ foxtrotgps-1.2.2+bzr331/src/tracks.c        2021-08-17 09:01:48.000000000 
+0300
@@ -865,7 +865,10 @@
 
        url = 
g_strdup_printf("http://www.yournavigation.org/api/1.0/gosmore.php?format=kml&flat=%s&flon=%s&tlat=%s&tlon=%s&v=motorcar&fast=1&layer=mapnik",startlatstr,
 startlonstr, endlatstr, endlonstr);
 #if GLIB_CHECK_VERSION(2,34,0)
-       if (!g_thread_new("fetch track thread", &fetch_track_thread, (void 
*)url) != 0)
+       GThread *gt = g_thread_new("fetch track thread", &fetch_track_thread, 
(void *)url);
+       if (gt != 0)
+               g_thread_unref(gt);
+       else
 #else
        if (!g_thread_create(&fetch_track_thread, (void *)url, FALSE, NULL) != 
0)
 #endif
@@ -933,7 +936,10 @@
        urlAndRequest[1] = request;
 
 #if GLIB_CHECK_VERSION(2,34,0)
-       if (!g_thread_new("fetch open route thread", 
&fetch_openrouteservice_track_thread, (void *)urlAndRequest) != 0)
+       GThread *gt =g_thread_new("fetch open route thread", 
&fetch_openrouteservice_track_thread, (void *)urlAndRequest);
+       if (gt != 0)
+               g_thread_unref(gt);
+       else
 #else
        if (!g_thread_create(&fetch_openrouteservice_track_thread, (void 
*)urlAndRequest, FALSE, NULL) != 0)
 #endif

Reply via email to