problems with threads/destructors in -current with llvm/clang

From: Mark Atkinson <atkin901_at_gmail.com>
Date: Thu, 06 Dec 2012 09:12:55 -0800
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Short backstory, I had recently upgraded my workstation to the latest
current which included clang as default cc now.

Compiling chromium failed for want of SSE2, which led me to recompile
world with CPUTYPE?=core2.   The original flag for world/ports was
CPUTYPE?=i686.

After recompilation chromium would sigbus on loading any extensions.

I made a concerted effort to recompile the whole ports tree and base
on clang to make sure the link stages were CPUTYPE clean, but I
experienced the same behavior.

Probably the best illustration of the type of problems I'm seeing is
qdbus from /usr/ports/devel/dbus-qt4.

Compiled with clang at r243950:

qdbus under kde segfaults in malloc with a huge recursion stack:

[...]
#44740 0x282f7bd4 in QObject::QObject () from
/usr/local/lib/qt4/libQtCore.so.4
#44741 0x281cb649 in QAdoptedThread::QAdoptedThread () from
/usr/local/lib/qt4/libQtCore.so.4
#44742 0x281ce146 in QThreadData::current () from
/usr/local/lib/qt4/libQtCore.so.4
#44743 0x282f7bd4 in QObject::QObject () from
/usr/local/lib/qt4/libQtCore.so.4
#44744 0x281cb649 in QAdoptedThread::QAdoptedThread () from
/usr/local/lib/qt4/libQtCore.so.4
#44745 0x281ce146 in QThreadData::current () from
/usr/local/lib/qt4/libQtCore.so.4
#44746 0x282f7bd4 in QObject::QObject () from
/usr/local/lib/qt4/libQtCore.so.4
#44747 0x281cb649 in QAdoptedThread::QAdoptedThread () from
/usr/local/lib/qt4/libQtCore.so.4
#44748 0x281ce146 in QThreadData::current () from
/usr/local/lib/qt4/libQtCore.so.4
#44749 0x281cbc05 in QThread::currentThread () from
/usr/local/lib/qt4/libQtCore.so.4
#44750 0x28095d21 in QDBusConnectionPrivate::deleteYourself () from
/usr/local/lib/qt4/libQtDBus.so.4
#44751 0x28089634 in QDBusConnection::~QDBusConnection () from
/usr/local/lib/qt4/libQtDBus.so.4
#44752 0x0804b800 in __dtor__ZL10connection ()
#44753 0x28660417 in __cxa_finalize () from /lib/libc.so.7
#44754 0x2860747a in exit () from /lib/libc.so.7
#44755 0x0804c125 in main ()
(gdb)


Compiled with gcc46, no segfault, and seems to follow  a normal
chain to exiting.

[Switching to Thread 29003080 (LWP 100603/qdbus)]

Breakpoint 2, 0x285f8462 in exit () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function exit,
which has no line number information.
0x28677fc0 in f_prealloc () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function f_prealloc,
which has no line number information.
0x2861bd30 in register_printf_render_std () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function register_printf_render_std,
which has no line number information.
0x28678190 in fflush () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function fflush,
which has no line number information.
0x2861bd7e in register_printf_render_std () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function register_printf_render_std,
which has no line number information.
0x28678190 in fflush () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function fflush,
which has no line number information.
0x2861bd7e in register_printf_render_std () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function register_printf_render_std,
which has no line number information.
0x28678190 in fflush () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function fflush,
which has no line number information.
0x2861bd7e in register_printf_render_std () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function register_printf_render_std,
which has no line number information.
0x28677fdf in f_prealloc () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function f_prealloc,
which has no line number information.
0x285f848b in exit () from /lib/libc.so.7
(gdb) n
Single stepping until exit from function exit,
which has no line number information.

Program exited normally.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlDA0hcACgkQrDN5kXnx8yb/UACfbpACSvjZGIl7d7H30mb6dptX
C2MAn2Jxfr/9MVKG4HzC1KOBl+N8EiLe
=9pw6
-----END PGP SIGNATURE-----
Received on Thu Dec 06 2012 - 16:13:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:32 UTC