Re: problems with threads/destructors in -current with llvm/clan

看板FB_current作者時間12年前 (2013/04/27 12:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/12 (看更多)
On 12/7/2012 6:08 AM, Dimitry Andric wrote: > On 2012-12-07 13:59, Dimitry Andric wrote: >> On 2012-12-06 18:12, Mark Atkinson wrote: >>> Short backstory, I had recently upgraded my workstation to the latest >>> current which included clang as default cc now. >> ... >>> qdbus under kde segfaults in malloc with a huge recursion stack: > ... >> This is a bug in qdbus; it uses a global static QDBusConnection object, >> and the order in which global destructors are called is undefined: > ... >> The global static QDBusConnection object should be replaced by a >> singleton, as suggested here: > > Here is an alternative solution, where the QDBusConnection object is > just a local variable in main(), and passed around as a const reference. > To make the destructors work properly, I also replaced the exit() calls > in main() with return statements. > > With this patch (placed in /usr/ports/devel/dbus-qt4/files), qdbus > starts up and exits normally for me. I did not do any other rigorous > testing, though. :) Thanks for the awesome analysis. I will endeavor to figure out the bug in automoc4 that keeps it segfaulting randomly during compilation. Weirdly it segfaults reliably under portmaster, but may work just fine under just make. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1HUrK7ru (FB_current)
討論串 (同標題文章)
完整討論串 (本文為第 4 之 12 篇):
文章代碼(AID): #1HUrK7ru (FB_current)