Date: Mon, 10 Dec 2012 13:13:23 -0800 From: Mark Atkinson <atkin901@gmail.com> To: freebsd-current@freebsd.org Cc: kde-freebsd@freebsd.kde.org Subject: Re: problems with threads/destructors in -current with llvm/clang Message-ID: <ka5j9h$pel$1@ger.gmane.org> In-Reply-To: <ka5hl1$919$1@ger.gmane.org> References: <k9qjml$ri7$1@ger.gmane.org> <50C1E81A.1040107@FreeBSD.org> <50C1F862.2010501@FreeBSD.org> <k9t6bq$bhs$1@ger.gmane.org> <50C22789.3030303@FreeBSD.org> <ka56gv$t60$1@ger.gmane.org> <20121210182525.GR3013@kib.kiev.ua> <ka5gmu$129$1@ger.gmane.org> <20121210203331.GV3013@kib.kiev.ua> <ka5hl1$919$1@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/10/2012 12:45, Mark Atkinson wrote: > On 12/10/2012 12:33, Konstantin Belousov wrote: > >> Hmm. Since I took out -O2 and added -g in rebuilding >> libthr/libc/rtld, I figured I needed to reproduce a new >> segfault, but the rtld side of things seems broken: >>> Use e.g. cd src/libexec/rtld-elf && make DEBUG_FLAGS=-g clean >>> all install This is really FAQ. > > > It _is_ strange, because I did almost exactly that (dumped a > temporary DEBUG_FLAGS/CFLAGS in /etc/make.conf) > > The one I had problems with was libc since It needs a make depend > in there. > > $ readelf -w /libexec/ld-elf.so.1 |head The section .debug_aranges > contains: > > Length: 28 Version: 2 Offset > into .debug_info: 0 Pointer Size: 4 Segment Size: > 0 > > Address Length 0x00000e80 0x49 $ So ignoring this weirdness, running under valgrind always segfaults and the core seems useful. #0 0x0061bd59 in handle_signal (actp=0xbf9fd490, sig=20, info=0xbf9fd7b0, ucp=0x0) at /usr/src/lib/libthr/thread/thr_sig.c:198 #1 0x0061b71c in thr_sighandler (sig=20, info=0xbf9fd7b0, _ucp=0x0) at /usr/src/lib/libthr/thread/thr_sig.c:182 #2 0x380434dc in ?? () #3 0x00000014 in ?? () #4 0xbf9fd7b0 in ?? () #5 0x00000000 in ?? () (gdb) frame 0 #0 0x0061bd59 in handle_signal (actp=0xbf9fd490, sig=20, info=0xbf9fd7b0, ucp=0x0) at /usr/src/lib/libthr/thread/thr_sig.c:198 198 SIGSETOR(actp->sa_mask, ucp->uc_sigmask); (gdb) list 193 int cancel_enable; 194 int in_sigsuspend; 195 int err; 196 197 /* add previous level mask */ 198 SIGSETOR(actp->sa_mask, ucp->uc_sigmask); 199 200 /* add this signal's mask */ 201 if (!(actp->sa_flags & SA_NODEFER)) 202 SIGADDSET(actp->sa_mask, sig); (gdb) p actp $1 = (struct sigaction *) 0xbf9fd490 (gdb) p *actp $2 = {__sigaction_u = {__sa_handler = 0x288310 <qt_sa_sigchld_handler(int)>, __sa_sigaction = 0x288310 <qt_sa_sigchld_handler(int)>}, sa_flags = 8, sa_mask = {__bits = {0, 0, 0, 0}}} (gdb) p *ucp Cannot access memory at address 0x0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlDGUHMACgkQrDN5kXnx8yYBDACfaBBZyDZnQhbxxjw46csLbg7z X7UAn1ea4LbW8PHXL07BwraiVXakh1bU =GktK -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ka5j9h$pel$1>