packages: xz/xz.spec, xz/xz-git.patch (NEW) - rel 6; fix segfault and deadl...

arekm arekm at pld-linux.org
Sun Oct 23 16:23:08 CEST 2011


Author: arekm                        Date: Sun Oct 23 14:23:08 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 6; fix segfault and deadlock (from upstream)

---- Files affected:
packages/xz:
   xz.spec (1.71 -> 1.72) , xz-git.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/xz/xz.spec
diff -u packages/xz/xz.spec:1.71 packages/xz/xz.spec:1.72
--- packages/xz/xz.spec:1.71	Sun Oct 23 12:49:10 2011
+++ packages/xz/xz.spec	Sun Oct 23 16:23:03 2011
@@ -19,13 +19,14 @@
 Summary(pl.UTF-8):	Koder/Dekoder LZMA
 Name:		xz
 Version:	5.1.1
-Release:	5
+Release:	6
 Epoch:		1
 License:	LGPL v2.1+, helper scripts on GPL v2+
 Group:		Applications/Archiving
 Source0:	http://tukaani.org/xz/%{name}-%{version}alpha.tar.gz
 # Source0-md5:	bb24436fa12780808e1c142980484104
 Patch0:		%{name}-parallel.patch
+Patch1:		%{name}-git.patch
 URL:		http://tukaani.org/xz/
 %{?with_asm:BuildRequires:	gcc >= 5:3.4}
 BuildRequires:	rpm >= 4.4.9-56
@@ -118,6 +119,7 @@
 %prep
 %setup -q -n %{name}-%{version}alpha
 %patch0 -p1
+%patch1 -p1
 
 %build
 %configure \
@@ -183,6 +185,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.72  2011/10/23 14:23:03  arekm
+- rel 6; fix segfault and deadlock (from upstream)
+
 Revision 1.71  2011/10/23 10:49:10  arekm
 - release 5
 

================================================================
Index: packages/xz/xz-git.patch
diff -u /dev/null packages/xz/xz-git.patch:1.1
--- /dev/null	Sun Oct 23 16:23:08 2011
+++ packages/xz/xz-git.patch	Sun Oct 23 16:23:03 2011
@@ -0,0 +1,52 @@
+commit 6b620a0f0813d28c3c544b4ff8cb595b38a6e908
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   Sun Oct 23 17:05:55 2011 +0300
+
+    liblzma: Fix a deadlock in the threaded encoder.
+    
+    It was triggered when reinitializing the encoder,
+    e.g. when encoding two files.
+
+diff --git a/src/liblzma/common/stream_encoder_mt.c b/src/liblzma/common/stream_encoder_mt.c
+index 323f04a..a4b2800 100644
+--- a/src/liblzma/common/stream_encoder_mt.c
++++ b/src/liblzma/common/stream_encoder_mt.c
+@@ -295,8 +295,10 @@ worker_start(void *thr_ptr)
+ 			while (true) {
+ 				// The thread is already idle so if we are
+ 				// requested to stop, just set the state.
+-				if (thr->state == THR_STOP)
++				if (thr->state == THR_STOP) {
+ 					thr->state = THR_IDLE;
++					pthread_cond_signal(&thr->cond);
++				}
+ 
+ 				state = thr->state;
+ 				if (state != THR_IDLE)
+commit ab50ae3ef40c81e5bf613905ca3fd636548b75e7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   Sun Oct 23 17:08:14 2011 +0300
+
+    liblzma: Fix invalid free() in the threaded encoder.
+    
+    It was triggered if initialization failed e.g. due to
+    running out of memory.
+    
+    Thanks to Arkadiusz Miskiewicz.
+
+diff --git a/src/liblzma/common/outqueue.c b/src/liblzma/common/outqueue.c
+index b9eac16..d7a87d9 100644
+--- a/src/liblzma/common/outqueue.c
++++ b/src/liblzma/common/outqueue.c
+@@ -101,7 +101,11 @@ extern void
+ lzma_outq_end(lzma_outq *outq, lzma_allocator *allocator)
+ {
+ 	lzma_free(outq->bufs, allocator);
++	outq->bufs = NULL;
++
+ 	lzma_free(outq->bufs_mem, allocator);
++	outq->bufs_mem = NULL;
++
+ 	return;
+ }
+ 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/xz/xz.spec?r1=1.71&r2=1.72&f=u



More information about the pld-cvs-commit mailing list