]> git.pld-linux.org Git - packages/xz.git/commitdiff
- rel 6; fix segfault and deadlock (from upstream) auto/th/xz-5_1_1-6 auto/ti/xz-5_1_1-6
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 23 Oct 2011 14:23:03 +0000 (14:23 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    xz-git.patch -> 1.1
    xz.spec -> 1.72

xz-git.patch [new file with mode: 0644]
xz.spec

diff --git a/xz-git.patch b/xz-git.patch
new file mode 100644 (file)
index 0000000..0af0451
--- /dev/null
@@ -0,0 +1,52 @@
+commit 6b620a0f0813d28c3c544b4ff8cb595b38a6e908
+Author: Lasse Collin <lasse.collin@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@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;
+ }
diff --git a/xz.spec b/xz.spec
index 815e54d7d156bca7342c28c7a0a25e5011adfd33..9d9227b5c716c39b70e6c7c761b3be82197aed10 100644 (file)
--- a/xz.spec
+++ b/xz.spec
@@ -18,13 +18,14 @@ Summary:    LZMA Encoder/Decoder
 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
@@ -117,6 +118,7 @@ Biblioteka statyczna LZMA.
 %prep
 %setup -q -n %{name}-%{version}alpha
 %patch0 -p1
+%patch1 -p1
 
 %build
 %configure \
This page took 0.038006 seconds and 4 git commands to generate.