From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8530 Path: news.gmane.org!not-for-mail From: u-wsnj@aetey.se Newsgroups: gmane.linux.lib.musl.general Subject: Re: pthread_getattr_np() vs explicit runtime loader Date: Sun, 20 Sep 2015 21:30:33 +0200 Message-ID: <20150920193033.GS12087@example.net> References: <20150920063909.GO12087@example.net> <20150920163405.GK17773@brightrain.aerifal.cx> <20150920172237.GR12087@example.net> <20150920182728.GM17773@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1442777476 27941 80.91.229.3 (20 Sep 2015 19:31:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Sep 2015 19:31:16 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8542-gllmg-musl=m.gmane.org@lists.openwall.com Sun Sep 20 21:31:07 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZdkKJ-0004Oi-5q for gllmg-musl@m.gmane.org; Sun, 20 Sep 2015 21:31:07 +0200 Original-Received: (qmail 18249 invoked by uid 550); 20 Sep 2015 19:31:05 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 18231 invoked from network); 20 Sep 2015 19:31:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fripost.org; h= in-reply-to:content-disposition:content-type:content-type :mime-version:references:message-id:subject:subject:from:from :date:date; s=20140703; t=1442777453; x=1444591854; bh=Lfr9ZblVR fzKScwRrSGkiy5ba3iGSOofpvup50P3vOg=; b=WrarjQVTrQMPEn5vBTmzzZ3eV By+WQTCOEFHwDQi7iIPmg+F2fjo/eeEUbxqhSiKgDeCpqLYl9OupCahdqO6IrANp je6MI4pkWswkv4GpXlmqq+u2AM20Mvx1tjZzkU+83b9U+EZwh2JmInI2g3h9Erjd xVsjX94SzL5T4W2VGY= X-Virus-Scanned: Debian amavisd-new at fripost.org Content-Disposition: inline In-Reply-To: <20150920182728.GM17773@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:8530 Archived-At: On Sun, Sep 20, 2015 at 02:27:28PM -0400, Rich Felker wrote: > Test program attached. It's just a very basic functionality check. Thanks. I may be misinterpreting the code but I do not see where it tests the condition (http://man7.org/linux/man-pages/man3/pthread_getattr_np.3.html) "Furthermore, if the stack address attribute was not set in the thread attributes object used to create the thread, then the returned thread attributes object will report the actual stack address that the implementation selected for the thread." It seems to be this case which coincides with the crash. I looked among others at http://www.openwall.com/lists/musl/2013/03/31/5 and http://git.musl-libc.org/cgit/musl/commit/?id=5db951ef80cae8b627f95b995811bf916c069757 and still am unsure whether the assumptions hold while using the explicit loader. > > > gcc? Have you used gdb to get a backtrace and see where the program > > > actually crashes? > > > > Not yet, going to. Rebuilding gcc with '-g', this takes some time. > > Unless gcc is the program crashing I don't see why you need to rebuild > gcc with -g... These _are_ several of the binaries of gcc-5.x which crash. It looks like the ones which crash (java-related ones?) are using pthread_getattr_np() while others do not. I did not though consequently check all of them. You can easily test this if you have got say a jv-convert binary of gcc-5.2.0, dynamically linked with musl and run this binary via the explicit loader. Yours and mine environments are different but I would not be surprised if the binary crashes for you too. Rune