Review Request 125249: Fix crash when KDirWatch is used in Q_GLOBAL_STATIC.

David Faure faure at kde.org
Tue Sep 15 21:13:01 UTC 2015


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

Review request for KDE Frameworks, Albert Astals Cid and Michael Pyne.


Repository: kcoreaddons


Description
-------

Now that the main thread singleton is deleted by a qApp post routine,
the KDirWatch destructor can run afterwards and hit a dangling pointer.
So we test whether the threadstorage still has data for this thread,
and skip code if not.


Diffs
-----

  autotests/kdirwatch_unittest.cpp dc532a0e42e2fd604525d16c25916b572720b484 
  src/lib/io/kdirwatch.cpp eceb9616fb740c542ce116594a57ba4c0a732c1f 

Diff: https://git.reviewboard.kde.org/r/125249/diff/


Testing
-------

This was making two kio unittests crash, but I now extended the kdirwatch unittest to hit the crash there, so that similar issues get detected earlier next time.


Thanks,

David Faure

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150915/a8a29d87/attachment.html>


More information about the Kde-frameworks-devel mailing list