From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8621 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl bug or not, real or not? (Was: [musl] Update: [musl] pthread_getattr_np() vs explicit runtime) loader Date: Tue, 6 Oct 2015 07:36:54 -0700 Message-ID: <20151006143653.GA4552@newbook> References: <20150920063909.GO12087@example.net> <20150920163405.GK17773@brightrain.aerifal.cx> <20150920172237.GR12087@example.net> <20150920182728.GM17773@brightrain.aerifal.cx> <20150920193033.GS12087@example.net> <20150920194132.GO17773@brightrain.aerifal.cx> <20150930154337.GC13149@example.net> <20150930203548.GF13149@example.net> <20151006113451.GI28311@example.net> 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 1444142233 8686 80.91.229.3 (6 Oct 2015 14:37:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Oct 2015 14:37:13 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8633-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 06 16:37:12 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 1ZjTMe-0003c0-DC for gllmg-musl@m.gmane.org; Tue, 06 Oct 2015 16:37:12 +0200 Original-Received: (qmail 13328 invoked by uid 550); 6 Oct 2015 14:37:10 -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 12286 invoked from network); 6 Oct 2015 14:37:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=R9h1g1Oa/zmi5fPHXoOwrPOrSw1nrx87fezMCFRE+Nw=; b=Xv2Pvx2KYx/c0BlDIjWuqGudp5JdVerrPEknFuABdB+Z0u4sbJPBvMKWdbqiYmSM1Q JQdxgYKt+H9i9mw+GcX222iIVxIoK+kzzrDZOkSp28i+CgluuR7SjOQoIzOMq9pYU/K6 gmwQzTWAs/UjTZQv9KGvASIavFWDJEvRg2f82al332jm7imR+MzAb342IgsYemXgaxBs e5z6SzlIyD5uE9+OGDWWmzZsBBKf4fXGPVVjQokhvU8OecK7SsLgo1m/Dbh//0EnDonp /0H0k7tc+8CPQMQVM5rxQwuZMW9f5BSaXvj6ybjasA4akn9PXyFPqSVvUDroBFyprBbg YKWQ== X-Received: by 10.68.183.5 with SMTP id ei5mr48099035pbc.124.1444142217461; Tue, 06 Oct 2015 07:36:57 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20151006113451.GI28311@example.net> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:8621 Archived-At: On Tue, Oct 06, 2015 at 01:34:51PM +0200, u-uy74@aetey.se wrote: > On Wed, Sep 30, 2015 at 10:35:48PM +0200, u-uy74@aetey.se wrote: > > On Wed, Sep 30, 2015 at 05:43:37PM +0200, u-uy74@aetey.se wrote: > > > > > > I still think that the crashes are caused by errors > > > while guessing the stack placement in pthread_getattr_np(), > > > simply because of the kernel doing something else than usual. > > > > I can reproduce the problem and this looks like something > > to fix or at least work around, either in gcc or in musl. > > > > Running with the implicit loader works, but using the explicit one yields: > > > > ---------------------------------------------------------------- > > # cat /proc/sys/kernel/randomize_va_space > > 2 > > > > $ /pathtomusllibc.so --library-path /pathtogcc-5libs /pathto/jv-convert --help > > Usage: jv-convert [OPTIONS] [INPUTFILE [OUTPUTFILE]] > > > > # echo 0 > /proc/sys/kernel/randomize_va_space > > > > $ /pathtomusllibc.so --library-path /pathtogcc-5libs /pathto/jv-convert --help > > Segmentation fault > > ---------------------------------------------------------------- > > > > Would anybody try this and confirm or refute? > > > > Rune > > Either nobody cares or nobody has a gcc-5.x toolchain built with musl? > Wondering. It's just that nobody cares about gcj, I think. Now that Alpine has moved to GCC 5.2, I've tried it with the distro packages. I've installed gcc-java; with both randomize_va_space = 0 and 2, specifying an alternate path to the default musl dynamic linker in the same way you did does not result in a segfault. Same goes with a local build of musl, using -Os. HTH, Isaac