Date: Sat, 08 Dec 2012 15:40:13 +0800 From: Kevin Lo <kevlo@FreeBSD.org> To: Dimitry Andric <dim@FreeBSD.org> Cc: kde-freebsd@kde.org, freebsd-current@FreeBSD.org, Mark Atkinson <atkin901@gmail.com> Subject: Re: problems with threads/destructors in -current with llvm/clang Message-ID: <1354952413.2318.4.camel@nsl> In-Reply-To: <50C1F862.2010501@FreeBSD.org> References: <k9qjml$ri7$1@ger.gmane.org> <50C1E81A.1040107@FreeBSD.org> <50C1F862.2010501@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. :) Works for me, thanks. I think your patch should go in. Kevin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1354952413.2318.4.camel>