Review Request 105404: Quit LibArchiveInterface::list() and the associated ListJob before deleting LibArchiveInterface in Archive's destructor

Elvis Angelaccio elvis.angelaccio at kdemail.net
Fri Sep 26 10:47:35 UTC 2014



> On Set. 26, 2014, 10:44 a.m., Elvis Angelaccio wrote:
> > Shouldn't this review be closed? I think that the target bug (193908) has been fixed by this review: https://git.reviewboard.kde.org/r/118108/

Ops, I accidentally clicked on ship-it, please ignore it.


- Elvis


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/105404/#review67477
-----------------------------------------------------------


On Ott. 26, 2012, 5:53 p.m., Nathan Mills wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/105404/
> -----------------------------------------------------------
> 
> (Updated Ott. 26, 2012, 5:53 p.m.)
> 
> 
> Review request for KDE Utils and Raphael Kubo da Costa.
> 
> 
> Bugs: 193908
>     http://bugs.kde.org/show_bug.cgi?id=193908
> 
> 
> Repository: ark
> 
> 
> Description
> -------
> 
> This patch fixes the crash when initially opening an archive with Ark using libarchive. The patch prevents a Job from using a deleted LibArchiveInterface by making sure that the Job quits before the LibArchiveInterface is deleted.
> When an Archive instance is being destroyed, the destructor first asks its ReadOnlyArchiveInterface instance to quit. The instance, which is really a LibArchiveInterface, then waits for its list() method to quit. Then the Archive instance's destructor waits for the most recently started Job to quit. Archive's destructor only waits for the Job to quit if the Archive's ReadOnlyArchiveInterface supports doKill().
> This patch could easily be extended to other Jobs as follows: For DeleteJob, the interface's doKill() method needs to quit the deleteFiles() call cleanly. For ExtractJob, the interface's doKill() method needs to quit copyFiles() cleanly. For AddJob, the interface's doKill() method needs to quit the addFiles() method cleanly. These three jobs should probably ask the user whether to continue with the operation, halt the operation, or delete the added/copied files.
> 
> 
> Diffs
> -----
> 
>   kerfuffle/archive.h 515788f 
>   kerfuffle/archive.cpp c2c5b18 
>   kerfuffle/jobs.h d704dfc 
>   kerfuffle/jobs.cpp aedc62c 
>   plugins/libarchive/libarchivehandler.h 9ec7541 
>   plugins/libarchive/libarchivehandler.cpp cd473ee 
> 
> Diff: https://git.reviewboard.kde.org/r/105404/diff/
> 
> 
> Testing
> -------
> 
> I started the patched version of Ark with a large tar archive and a small tar archive pressing Ctrl+Q each time. Then I reverted the patch, compiled Ark, and compared how long the unpatched version took to quit to make sure the patch didn't cause excessively long waits.
> 
> 
> Thanks,
> 
> Nathan Mills
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20140926/e553ce7d/attachment-0001.html>


More information about the Kde-utils-devel mailing list