D18758: Fix ASan error in test_cmakemanager by catching all signals before objects they are delivered to are deleted.

Gleb Popov noreply at phabricator.kde.org
Tue Jun 18 09:48:48 BST 2019


arrowd added a comment.


  R32:bd048e67f056b5be25ed57fb2be947444f68c24e <https://phabricator.kde.org/R32:bd048e67f056b5be25ed57fb2be947444f68c24e>
  
  In D18758#481339 <https://phabricator.kde.org/D18758#481339>, @mwolff wrote:
  
  > so, I've now committed an alternative fix (or so I hope...) see:
  >
  >   commit bd048e67f056b5be25ed57fb2be947444f68c24e
  >   Author: Milian Wolff <mail at milianw.de>
  >   Date:   Mon Jun 17 22:26:32 2019 +0200
  >  
  >       Guard against crashes when IStatus object gets destroyed at bad times
  >
  
  
  I confirm this fixes the issue for me. Yay, thanks!
  
  > having looked at the raw diff quickly, I like what I'm seeing. What boilerplate are you referring to?
  
  At `project.cpp:282`, mostly. This construct looks awful to me:
  
                });
                return retPromise;
            }
            return QtPromise::resolve();
        });
    
        return retPromise;
    }
    return QtPromise::resolve();
  
  And it gets only worser with more indirection. In first version of this patch I made a mistake here, forgot a `return` statement, and this made QtPromise silently not to resolve inner future. Coming from Haskell, I was thinking there should be better way to handle nested futures.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D18758

To: arrowd, #kdevelop, mwolff
Cc: apol, kfunk, brauch, mwolff, kdevelop-devel, hmitonneau, christiant, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190618/f9be0403/attachment-0001.html>


More information about the KDevelop-devel mailing list