https://bugs.kde.org/show_bug.cgi?id=368278

--- Comment #6 from Michael Pyne <mp...@kde.org> ---
Looks like the d-ptr for KDirWatch gets reset (but not deleted!) by
postRoutine_KDirWatch (which deletes the QFSWatcher but also deletes the
KDirWatchPrivate!).

Later the KDirWatch's global destructor runs due to the Q_GLOBAL_STATIC entry's
destruction, which checks its thread-local KDirWatchPrivate (stored in a
QThreadStorage). But the values are inconsistent here, the QThreadStorage still
has a KDirWatchPrivate (it was never deleted or reset), but the KDirWatch dtor
tries to access that KDirWatchPrivate through its own d-ptr (already reset to
nullptr...).

I'm not proficient with this code but it seems that either the d-ptr should
/not/ be reset when removing the QFSWatcher, or the QThreadStorage for all the
d-ptrs should *also* be reset when the d-ptr is, instead of the in-between we
currently have.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to