From owner-freebsd-threads@FreeBSD.ORG Fri Sep 26 19:37:49 2014 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA95FDDE for ; Fri, 26 Sep 2014 19:37:49 +0000 (UTC) Received: from friloux.me (friloux.me [195.154.7.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70DB2B16 for ; Fri, 26 Sep 2014 19:37:49 +0000 (UTC) Received: from Jetdail (143.147.84.77.rev.sfr.net [77.84.147.143]) by friloux.me (Postfix) with ESMTPSA id 1B944FF14; Fri, 26 Sep 2014 21:37:21 +0200 (CEST) Date: Fri, 26 Sep 2014 21:41:01 +0200 From: Guillaume Friloux To: Konstantin Belousov Subject: Re: Segfault from libthr.so. Message-ID: <20140926194100.GG7885@Jetdail> References: <20140926150001.GF7885@Jetdail> <20140926164306.GE8870@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h3LYUU6HlUDSAOzy" Content-Disposition: inline In-Reply-To: <20140926164306.GE8870@kib.kiev.ua> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: freebsd-threads@freebsd.org X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2014 19:37:49 -0000 --h3LYUU6HlUDSAOzy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 14/09/26, Konstantin Belousov wrote: > So, what is the problem, from your PoV ? > Linking libssp after libthr causes libssp constructors run before > libthr initialization, which causes the behaviour you see. The libssp > uses something which is interposed by libthr, but still not ready at > the libssp init time. Your example of linking with different order > demostrates you the right way to treat libthr. >=20 > So again, what is the problem ? Hello, to me this behavior did not look normal. I did not look at the code of both libs, i asked for help on IRC and got se= nt here. What surprised me is that i have never met this on GNU/Linux (i repeat, i a= m new to BSD). Isn't there a way to sanitize this and not jump into a segfault ? PS : I might just have been trolled by an IRC guy. --h3LYUU6HlUDSAOzy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUJcFMAAoJEG/Km+Gfxp5IX1EP/jyV4UQ539qLp8tiQzfnOz30 5IAtQ41O8/LC8g9nyAi1otwsbOlpLohnpUxFN2fgaaSjwI/v8c7sNfw4Xm6TkzXl /NbNJfmcgqTJ4Xcq4U6zr8oEn2uBrQ632MK3OtyBLmsrfiXqXOs5QJ1P4BCgVFPp y4QGQUcsGIZ2/0SEtqBty+5gUPA0OwwOeiC2Q9wn5PVsn/ywbo7DIhr5yhtJzYm+ BKstvT4mxdVgXFT92jk6qLYyzb44lrazK8M9ezs5b+aaccMr0yESIyRkiSNcpCXd dNv46CYJ2J+OyebwXJqeAUJVwqNj+f8CDVcPOUumVsVGNW+xYKbc8jpaMyGlV5K/ wNSOAGWTELj+53TKnUoJCsEZxbp70E0FjZK9JuGxZ9+hcXCqMBqKVlaNNvmivdE7 b7w8NhgCDsq97qEuCa/ggvO2JhMvHoeogCH+rX7FonOWdSB3JvcSYZZHzlzI8lxQ GxMiI80cmMj8+Hir36liLNRIZV0qENkUty0EkFA8BSlxToNWxEsXQk3Eu6wnLGJh 4pLfm8aBCQYJFOPBAf4v8w+df0AiovBYA0YkMqS5lbH7+bfbUL7rN02IBX+Wlq2A KkB7knDZ3ZGsnI8JeYXt+RtuM+KRIbZ/pfCs4jOkL7TTSBTR/AuW9OyCNotgMLHn XKrHyTKN44RygA4GuCdf =MtJy -----END PGP SIGNATURE----- --h3LYUU6HlUDSAOzy--