Date: Sat, 27 Sep 2014 08:55:56 +0200 From: Guillaume Friloux <guillaume@friloux.me> To: Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-threads@freebsd.org Subject: Re: Segfault from libthr.so. Message-ID: <20140927065556.GH7885@Jetdail> In-Reply-To: <20140926164306.GE8870@kib.kiev.ua> References: <20140926150001.GF7885@Jetdail> <20140926164306.GE8870@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--MPkR1dXiUZqK+927 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 ? Sorry to disturb you again, but i would have more access to your knowledge. I understand what you say, but in my case, it disturbs me a little. Lets take this project as example : https://github.com/gfriloux/botman As you can see, it uses an m4 macro that will force link to ssp (configure.= ac:38). Later on, deps will be declared (configure.ac:87). One of those deps is ein= a. Eina will declare -lpthread from its .pc file. And this is how i get to the state of having -lssp -lpthread. In my app, i dont directly start any thread, lower libs do. So it doesnt se= em logical to add -lpthread before declaring the deps. So should i just remove this m4 macro that seems to be use on quite some pr= ojects, so it works on BSD ? What is the best way to do it, in your opinion ? --MPkR1dXiUZqK+927 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUJl98AAoJEG/Km+Gfxp5IQA4P/A+Baryv14J9a0+aYIR81Gum xiTo+3NzLky/tLmVFXRaF0X5D01Jvy3EwqwdToVRQqNbJFYbKQgrFKnTnAcA7IfL 3W3vpUabiJ8gPoy72ZpiTKsC2UgJo/lZ+t3TNE6mnzkbhVQU3Uh08IAA0md0zwS1 M9sCENdca4PVxSlOTAaLpFcpgasDJVZj3PF/hnwoNSldx9lRt8wPm7yd3LbLFPEm gdLsZcBJcM9mHhmGC+4GaxsDDbz5SZ9py7rqYYbba2+WdPztyiUEb8db6fsFU6+e Fny60oi6akFadcRgPhZ6dXbwEc0bIeklFGB9OMY3ReuQ8Fda/D5q5MNeNPkyin2M 5/L8d/md19yOJne6tdZi0o8cyx10UflwEJVZnkRLmxHp1f9ec9d7/s1KHeBRKOhg 0i6enl2YnEK1klVK557N6BNP2zURC4QQGrvh3vtLMk7Kj0G3S6r76nrVsIy1Mvk1 IzOwb7qT9JT6bPkPBEOhMz0iZMQovUTY2RFYpzysDCC0k3i0rBjnEHKRYOqMqQOV 5Gx8quRzifTFAlAJgDNqowpdDc6wkd3awOVdsK2RkkqNsKryTOEAX+TpyxhRGVxQ yOO+pl3EY9w4wWJijAH69Vjt1hDqPggaZa+qHwu5KP0WVy9fTPjK+QprvXQDpcLH 0KPWsyP2hLH17pao/nMc =RSSZ -----END PGP SIGNATURE----- --MPkR1dXiUZqK+927--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140927065556.GH7885>