[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#864350: unblock: czmq/4.0.2-7



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Dear Release Team,

Please unblock package czmq

A memory leak was found a few days ago upstream in a hash table
implementation offered by this library. This has been fixed upstream
and has been tested there for a few days now [1].

I opened a bug to track it in Debian [2] and I have backported the fix,
it's a single line patch that adds the missing free() call and I have
uploaded it to unstable this morning.

The debdiff is attached and as you can see it consists in just the
patch and the single changelog entry.

Please consider allowing this for Stretch, so unblock with a 2 day
delay. I believe a fix for a memory leak should qualify as an
exception.

Thank you!

Kind regards,
Luca Boccassi

[1] https://github.com/zeromq/czmq/pull/1675
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864342
diff -Nru czmq-4.0.2/debian/changelog czmq-4.0.2/debian/changelog
--- czmq-4.0.2/debian/changelog 2017-01-24 13:33:14.000000000 +0000
+++ czmq-4.0.2/debian/changelog 2017-06-07 10:22:32.000000000 +0100
@@ -1,3 +1,11 @@
+czmq (4.0.2-7) unstable; urgency=medium
+
+  * Add 0007-zhashx_purge-leak-when-shrinking.patch backported from
+    upstream to fix memory leak in zhashx_purge when shrinking the table.
+    (Closes: #864342)
+
+ -- Luca Boccassi <luca.boccassi@gmail.com>  Wed, 07 Jun 2017 10:22:32 +0100
+
 czmq (4.0.2-6) unstable; urgency=medium
 
   * Set version of symbols added by patch to 4.0.2-4~ to fix L:E
diff -Nru czmq-4.0.2/debian/patches/0007-zhashx_purge-leak-when-shrinking.patch czmq-4.0.2/debian/patches/0007-zhashx_purge-leak-when-shrinking.patch
--- czmq-4.0.2/debian/patches/0007-zhashx_purge-leak-when-shrinking.patch 1970-01-01 01:00:00.000000000 +0100
+++ czmq-4.0.2/debian/patches/0007-zhashx_purge-leak-when-shrinking.patch 2017-06-07 10:14:48.000000000 +0100
@@ -0,0 +1,27 @@
+From 80624b71a112ff95e9f72ec379bca0c321d87623 Mon Sep 17 00:00:00 2001
+From: Jim Klimov <jim@jimklimov.com>
+Date: Thu, 1 Jun 2017 18:15:36 +0200
+Subject: [PATCH] Problem: zhashx_purge() seems to leak when shrinking
+
+Solution: freen() the old self->items before reassigning to the newly allocated smaller one
+
+Signed-off-by: Jim Klimov <EvgenyKlimov@eaton.com>
+---
+ src/zhashx.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/zhashx.c b/src/zhashx.c
+index 0631db14..bafab82b 100644
+--- a/src/zhashx.c
++++ b/src/zhashx.c
+@@ -395,6 +395,7 @@ zhashx_purge (zhashx_t *self)
+         size_t limit = primes [INITIAL_PRIME];
+         item_t **items = (item_t **) zmalloc (sizeof (item_t *) * limit);
+         assert (items);
++        free (self->items);
+         self->prime_index = INITIAL_PRIME;
+         self->chain_limit = INITIAL_CHAIN;
+         self->items = items;
+--
+2.11.0
+
diff -Nru czmq-4.0.2/debian/patches/series czmq-4.0.2/debian/patches/series
--- czmq-4.0.2/debian/patches/series 2017-01-24 11:32:31.000000000 +0000
+++ czmq-4.0.2/debian/patches/series 2017-06-07 09:58:19.000000000 +0100
@@ -4,3 +4,4 @@
 0004-zpoller_remove-does-not-always-fail.patch
 0005-zsys_shutdown-does-not-call-zmq_term.patch
 0006-public-API-changes-depending-on-libzmq-version.patch
+0007-zhashx_purge-leak-when-shrinking.patch

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: