There's a bug where archives with multiple stream 0 entries per chunk can be corrupted on decompression with threading enabled.

Until the bug is tracked down, disable multithreaded decompression when an archive with interleaved stream 0/1 entries is detected.
This commit is contained in:
Con Kolivas 2010-12-18 00:50:49 +11:00
parent 2cabb335cb
commit e1bb9ebda5

View file

@ -1207,7 +1207,14 @@ fill_another:
s->uthread_no, c_len, stream); s->uthread_no, c_len, stream);
create_pthread(&threads[s->uthread_no], NULL, ucompthread, (void *)s->uthread_no); create_pthread(&threads[s->uthread_no], NULL, ucompthread, (void *)s->uthread_no);
if (!last_head) if (stream == 0 && last_head && control.threads > 1) {
int i;
print_verbose("Interleaved streams detected, dropping to single threaded decompression as a precaution.\n");
for (i = 0; i < NUM_STREAMS; i++)
sinfo->s[i].total_threads = 1;
control.threads = 1;
} else if (!last_head)
s->eos = 1; s->eos = 1;
if (++s->uthread_no == s->base_thread + s->total_threads) if (++s->uthread_no == s->base_thread + s->total_threads)