In order to fix T10987 we need to apply the same fix as in commit b1a251ebb96b86c8cb, i.e. make `LibarchivePlugin::doKill()` return `false` at least for AddJobs.
However this change currently exposes the following crash:
```
==9360== Invalid read of size 8
==9360== at 0x16A00430: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A0093D: __archive_write_filter (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A06B1E: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00A05: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00CE8: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x1694CA8F: LibarchivePlugin::ArchiveWriteCustomDeleter::cleanup(archive*) (libarchiveplugin.h:75)
==9360== by 0x1694ABBF: QScopedPointer<archive, LibarchivePlugin::ArchiveWriteCustomDeleter>::~QScopedPointer() (qscopedpointer.h:107)
==9360== by 0x1694DA76: ReadWriteLibarchivePlugin::~ReadWriteLibarchivePlugin() (readwritelibarchiveplugin.cpp:51)
==9360== by 0x1694DAB8: ReadWriteLibarchivePlugin::~ReadWriteLibarchivePlugin() (readwritelibarchiveplugin.cpp:50)
==9360== by 0x6A4643A: QObjectPrivate::deleteChildren() (in /usr/lib/libQt5Core.so.5.13.0)
==9360== by 0x6A4F1B4: QObject::~QObject() (in /usr/lib/libQt5Core.so.5.13.0)
==9360== by 0x488D5DC: Kerfuffle::Archive::~Archive() (archive_kerfuffle.cpp:205)
==9360== Address 0xb4b0580 is 0 bytes inside a block of size 32 free'd
==9360== at 0x48399AB: free (vg_replace_malloc.c:530)
==9360== by 0x16A00363: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A06AD6: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00A05: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x1694EFCB: ReadWriteLibarchivePlugin::finish(bool) (readwritelibarchiveplugin.cpp:394)
==9360== by 0x1694E6D8: ReadWriteLibarchivePlugin::addFiles(QVector<Kerfuffle::Archive::Entry*> const&, Kerfuffle::Archive::Entry const*, Kerfuffle::CompressionOptions const&, unsigned int) (readwritelibarchiveplugin.cpp:136)
==9360== by 0x489CEC1: Kerfuffle::AddJob::doWork() (jobs.cpp:684)
==9360== by 0x489851C: Kerfuffle::Job::Private::run() (jobs.cpp:66)
==9360== by 0x6857DEB: ??? (in /usr/lib/libQt5Core.so.5.13.0)
==9360== by 0x7B7F57E: start_thread (in /usr/lib/libpthread-2.29.so)
==9360== by 0x7111F12: clone (in /usr/lib/libc-2.29.so)
==9360== Block was alloc'd at
==9360== at 0x483AB65: calloc (vg_replace_malloc.c:752)
==9360== by 0x16A007DD: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A066F4: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00B4A: archive_write_open (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x1694E98B: ReadWriteLibarchivePlugin::initializeWriter(bool, Kerfuffle::CompressionOptions const&) (readwritelibarchiveplugin.cpp:256)
==9360== by 0x1694DCA8: ReadWriteLibarchivePlugin::addFiles(QVector<Kerfuffle::Archive::Entry*> const&, Kerfuffle::Archive::Entry const*, Kerfuffle::CompressionOptions const&, unsigned int) (readwritelibarchiveplugin.cpp:66)
==9360== by 0x489CEC1: Kerfuffle::AddJob::doWork() (jobs.cpp:684)
==9360== by 0x489851C: Kerfuffle::Job::Private::run() (jobs.cpp:66)
==9360== by 0x6857DEB: ??? (in /usr/lib/libQt5Core.so.5.13.0)
==9360== by 0x7B7F57E: start_thread (in /usr/lib/libpthread-2.29.so)
==9360== by 0x7111F12: clone (in /usr/lib/libc-2.29.so)
==9360==
==9360== Invalid read of size 4
==9360== at 0x16A04643: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00456: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A0093D: __archive_write_filter (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A06B1E: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00A05: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00CE8: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x1694CA8F: LibarchivePlugin::ArchiveWriteCustomDeleter::cleanup(archive*) (libarchiveplugin.h:75)
==9360== by 0x1694ABBF: QScopedPointer<archive, LibarchivePlugin::ArchiveWriteCustomDeleter>::~QScopedPointer() (qscopedpointer.h:107)
==9360== by 0x1694DA76: ReadWriteLibarchivePlugin::~ReadWriteLibarchivePlugin() (readwritelibarchiveplugin.cpp:51)
==9360== by 0x1694DAB8: ReadWriteLibarchivePlugin::~ReadWriteLibarchivePlugin() (readwritelibarchiveplugin.cpp:50)
==9360== by 0x6A4643A: QObjectPrivate::deleteChildren() (in /usr/lib/libQt5Core.so.5.13.0)
==9360== by 0x6A4F1B4: QObject::~QObject() (in /usr/lib/libQt5Core.so.5.13.0)
==9360== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==9360==
==9360==
==9360== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==9360== Access not within mapped region at address 0x0
==9360== at 0x16A04643: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00456: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A0093D: __archive_write_filter (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A06B1E: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00A05: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x16A00CE8: ??? (in /usr/lib/libarchive.so.13.3.3)
==9360== by 0x1694CA8F: LibarchivePlugin::ArchiveWriteCustomDeleter::cleanup(archive*) (libarchiveplugin.h:75)
==9360== by 0x1694ABBF: QScopedPointer<archive, LibarchivePlugin::ArchiveWriteCustomDeleter>::~QScopedPointer() (qscopedpointer.h:107)
==9360== by 0x1694DA76: ReadWriteLibarchivePlugin::~ReadWriteLibarchivePlugin() (readwritelibarchiveplugin.cpp:51)
==9360== by 0x1694DAB8: ReadWriteLibarchivePlugin::~ReadWriteLibarchivePlugin() (readwritelibarchiveplugin.cpp:50)
==9360== by 0x6A4643A: QObjectPrivate::deleteChildren() (in /usr/lib/libQt5Core.so.5.13.0)
==9360== by 0x6A4F1B4: QObject::~QObject() (in /usr/lib/libQt5Core.so.5.13.0)
==9360== If you believe this happened as a result of a stack
==9360== overflow in your program's main thread (unlikely but
==9360== possible), you can try to increase the size of the
==9360== main thread stack using the --main-stacksize= flag.
==9360== The main thread stack size used in this run was 8388608.==21862== Invalid read of size 8
==21862== at 0x168510B2: archive_write_client_write (archive_write.c:385)
==21862== by 0x1685099B: __archive_write_filter (archive_write.c:237)
==21862== by 0x1685B385: archive_compressor_gzip_close (archive_write_add_filter_gzip.c:316)
==21862== by 0x16850A38: __archive_write_close_filter (archive_write.c:260)
==21862== by 0x1685158B: _archive_write_close (archive_write.c:524)
==21862== by 0x168501D7: archive_write_close (archive_virtual.c:68)
==21862== by 0x168517A8: _archive_write_free (archive_write.c:585)
==21862== by 0x16850194: archive_free (archive_virtual.c:62)
==21862== by 0x16850244: archive_write_free (archive_virtual.c:87)
==21862== by 0x1679CABF: LibarchivePlugin::ArchiveWriteCustomDeleter::cleanup(archive*) (libarchiveplugin.h:75)
==21862== by 0x1679ABEF: QScopedPointer<archive, LibarchivePlugin::ArchiveWriteCustomDeleter>::~QScopedPointer() (qscopedpointer.h:107)
==21862== by 0x1679DAB6: ReadWriteLibarchivePlugin::~ReadWriteLibarchivePlugin() (readwritelibarchiveplugin.cpp:51)
==21862== Address 0x135d5bd0 is 0 bytes inside a block of size 32 free'd
==21862== at 0x48399AB: free (vg_replace_malloc.c:530)
==21862== by 0x1685131A: archive_write_client_close (archive_write.c:441)
==21862== by 0x16850A38: __archive_write_close_filter (archive_write.c:260)
==21862== by 0x1685B4E0: archive_compressor_gzip_close (archive_write_add_filter_gzip.c:341)
==21862== by 0x16850A38: __archive_write_close_filter (archive_write.c:260)
==21862== by 0x1685158B: _archive_write_close (archive_write.c:524)
==21862== by 0x168501D7: archive_write_close (archive_virtual.c:68)
==21862== by 0x1679F0BB: ReadWriteLibarchivePlugin::finish(bool) (readwritelibarchiveplugin.cpp:412)
==21862== by 0x1679E747: ReadWriteLibarchivePlugin::addFiles(QVector<Kerfuffle::Archive::Entry*> const&, Kerfuffle::Archive::Entry const*, Kerfuffle::CompressionOptions const&, unsigned int) (readwritelibarchiveplugin.cpp:137)
==21862== by 0x489CEC1: Kerfuffle::AddJob::doWork() (jobs.cpp:684)
==21862== by 0x489851C: Kerfuffle::Job::Private::run() (jobs.cpp:66)
==21862== by 0x6857DEB: ??? (in /usr/lib/libQt5Core.so.5.13.0)
==21862== Block was alloc'd at
==21862== at 0x483AB65: calloc (vg_replace_malloc.c:752)
==21862== by 0x16850D6A: archive_write_client_open (archive_write.c:301)
==21862== by 0x168509F4: __archive_write_open_filter (archive_write.c:250)
==21862== by 0x1685AE04: archive_compressor_gzip_open (archive_write_add_filter_gzip.c:187)
==21862== by 0x168509F4: __archive_write_open_filter (archive_write.c:250)
==21862== by 0x16850C7A: archive_write_open (archive_write.c:480)
==21862== by 0x16857D38: archive_write_open_fd (archive_write_open_fd.c:75)
==21862== by 0x1679EA7B: ReadWriteLibarchivePlugin::initializeWriter(bool, Kerfuffle::CompressionOptions const&) (readwritelibarchiveplugin.cpp:267)
==21862== by 0x1679DD17: ReadWriteLibarchivePlugin::addFiles(QVector<Kerfuffle::Archive::Entry*> const&, Kerfuffle::Archive::Entry const*, Kerfuffle::CompressionOptions const&, unsigned int) (readwritelibarchiveplugin.cpp:67)
==21862== by 0x489CEC1: Kerfuffle::AddJob::doWork() (jobs.cpp:684)
==21862== by 0x489851C: Kerfuffle::Job::Private::run() (jobs.cpp:66)
==21862== by 0x6857DEB: ??? (in /usr/lib/libQt5Core.so.5.13.0)
==21862==
==21862== Invalid read of size 8
==21862== at 0x168510DD: archive_write_client_write (archive_write.c:388)
==21862== by 0x1685099B: __archive_write_filter (archive_write.c:237)
==21862== by 0x1685B385: archive_compressor_gzip_close (archive_write_add_filter_gzip.c:316)
==21862== by 0x16850A38: __archive_write_close_filter (archive_write.c:260)
==21862== by 0x1685158B: _archive_write_close (archive_write.c:524)
==21862== by 0x168501D7: archive_write_close (archive_virtual.c:68)
==21862== by 0x168517A8: _archive_write_free (archive_write.c:585)
==21862== by 0x16850194: archive_free (archive_virtual.c:62)
==21862== by 0x16850244: archive_write_free (archive_virtual.c:87)
==21862== by 0x1679CABF: LibarchivePlugin::ArchiveWriteCustomDeleter::cleanup(archive*) (libarchiveplugin.h:75)
==21862== by 0x1679ABEF: QScopedPointer<archive, LibarchivePlugin::ArchiveWriteCustomDeleter>::~QScopedPointer() (qscopedpointer.h:107)
==21862== by 0x1679DAB6: ReadWriteLibarchivePlugin::~ReadWriteLibarchivePlugin() (readwritelibarchiveplugin.cpp:51)
==21862== Address 0x135d5bd0 is 0 bytes inside a block of size 32 free'd
==21862== at 0x48399AB: free (vg_replace_malloc.c:530)
==21862== by 0x1685131A: archive_write_client_close (archive_write.c:441)
==21862== by 0x16850A38: __archive_write_close_filter (archive_write.c:260)
==21862== by 0x1685B4E0: archive_compressor_gzip_close (archive_write_add_filter_gzip.c:341)
==21862== by 0x16850A38: __archive_write_close_filter (archive_write.c:260)
==21862== by 0x1685158B: _archive_write_close (archive_write.c:524)
==21862== by 0x168501D7: archive_write_close (archive_virtual.c:68)
==21862== by 0x1679F0BB: ReadWriteLibarchivePlugin::finish(bool) (readwritelibarchiveplugin.cpp:412)
==21862== by 0x1679E747: ReadWriteLibarchivePlugin::addFiles(QVector<Kerfuffle::Archive::Entry*> const&, Kerfuffle::Archive::Entry const*, Kerfuffle::CompressionOptions const&, unsigned int) (readwritelibarchiveplugin.cpp:137)
==21862== by 0x489CEC1: Kerfuffle::AddJob::doWork() (jobs.cpp:684)
==21862== by 0x489851C: Kerfuffle::Job::Private::run() (jobs.cpp:66)
==21862== by 0x6857DEB: ??? (in /usr/lib/libQt5Core.so.5.13.0)
==21862== Block was alloc'd at
==21862== at 0x483AB65: calloc (vg_replace_malloc.c:752)
==21862== by 0x16850D6A: archive_write_client_open (archive_write.c:301)
==21862== by 0x168509F4: __archive_write_open_filter (archive_write.c:250)
==21862== by 0x1685AE04: archive_compressor_gzip_open (archive_write_add_filter_gzip.c:187)
==21862== by 0x168509F4: __archive_write_open_filter (archive_write.c:250)
==21862== by 0x16850C7A: archive_write_open (archive_write.c:480)
==21862== by 0x16857D38: archive_write_open_fd (archive_write_open_fd.c:75)
==21862== by 0x1679EA7B: ReadWriteLibarchivePlugin::initializeWriter(bool, Kerfuffle::CompressionOptions const&) (readwritelibarchiveplugin.cpp:267)
==21862== by 0x1679DD17: ReadWriteLibarchivePlugin::addFiles(QVector<Kerfuffle::Archive::Entry*> const&, Kerfuffle::Archive::Entry const*, Kerfuffle::CompressionOptions const&, unsigned int) (readwritelibarchiveplugin.cpp:67)
==21862== by 0x489CEC1: Kerfuffle::AddJob::doWork() (jobs.cpp:684)
==21862== by 0x489851C: Kerfuffle::Job::Private::run() (jobs.cpp:66)
==21862== by 0x6857DEB: ??? (in /usr/lib/libQt5Core.so.5.13.0)
==21862==
==21862== Invalid read of size 4
==21862== at 0x16857F14: file_write (archive_write_open_fd.c:125)
==21862== by 0x168510E1: archive_write_client_write (archive_write.c:387)
==21862== by 0x1685099B: __archive_write_filter (archive_write.c:237)
==21862== by 0x1685B385: archive_compressor_gzip_close (archive_write_add_filter_gzip.c:316)
==21862== by 0x16850A38: __archive_write_close_filter (archive_write.c:260)
==21862== by 0x1685158B: _archive_write_close (archive_write.c:524)
==21862== by 0x168501D7: archive_write_close (archive_virtual.c:68)
==21862== by 0x168517A8: _archive_write_free (archive_write.c:585)
==21862== by 0x16850194: archive_free (archive_virtual.c:62)
==21862== by 0x16850244: archive_write_free (archive_virtual.c:87)
==21862== by 0x1679CABF: LibarchivePlugin::ArchiveWriteCustomDeleter::cleanup(archive*) (libarchiveplugin.h:75)
==21862== by 0x1679ABEF: QScopedPointer<archive, LibarchivePlugin::ArchiveWriteCustomDeleter>::~QScopedPointer() (qscopedpointer.h:107)
==21862== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==21862==
==21862==
==21862== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==21862== Access not within mapped region at address 0x0
==21862== at 0x16857F14: file_write (archive_write_open_fd.c:125)
==21862== by 0x168510E1: archive_write_client_write (archive_write.c:387)
==21862== by 0x1685099B: __archive_write_filter (archive_write.c:237)
==21862== by 0x1685B385: archive_compressor_gzip_close (archive_write_add_filter_gzip.c:316)
==21862== by 0x16850A38: __archive_write_close_filter (archive_write.c:260)
==21862== by 0x1685158B: _archive_write_close (archive_write.c:524)
==21862== by 0x168501D7: archive_write_close (archive_virtual.c:68)
==21862== by 0x168517A8: _archive_write_free (archive_write.c:585)
==21862== by 0x16850194: archive_free (archive_virtual.c:62)
==21862== by 0x16850244: archive_write_free (archive_virtual.c:87)
==21862== by 0x1679CABF: LibarchivePlugin::ArchiveWriteCustomDeleter::cleanup(archive*) (libarchiveplugin.h:75)
==21862== by 0x1679ABEF: QScopedPointer<archive, LibarchivePlugin::ArchiveWriteCustomDeleter>::~QScopedPointer() (qscopedpointer.h:107)
````
This is possibly due to `m_tempFile` and `m_archiveWriter` being class member (since @mvlabat's GSoC refactoring), while they used to be local variables in `ReadWriteLibarchivePlugin::addFiles()`.