From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8589 Path: news.gmane.org!not-for-mail From: u-uy74@aetey.se Newsgroups: gmane.linux.lib.musl.general Subject: Update: [musl] pthread_getattr_np() vs explicit runtime loader Date: Wed, 30 Sep 2015 22:35:48 +0200 Message-ID: <20150930203548.GF13149@example.net> 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> 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 1443645388 7661 80.91.229.3 (30 Sep 2015 20:36:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Sep 2015 20:36:28 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8601-gllmg-musl=m.gmane.org@lists.openwall.com Wed Sep 30 22:36:18 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 1ZhO6p-0002TA-6D for gllmg-musl@m.gmane.org; Wed, 30 Sep 2015 22:36:15 +0200 Original-Received: (qmail 15751 invoked by uid 550); 30 Sep 2015 20:36:12 -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 15733 invoked from network); 30 Sep 2015 20:36:12 -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=1443645360; x=1445459761; bh=GIjwoa/bE xfC6Z7DgBIgxTR+gxy6jnTMxMHitRiOTC4=; b=HcNoiIQModOVP9nkR2+9ao4ms V14W5gkO8SRQNfXq/oxLH3PGEBAk1HRo2Il9hcpOJ6tWGdw6hoNVNGlPJEROTKxZ r2FdpAH5N0ga/O0luVp63NgfzNSaIa5tdJ+iyTNfKc+VUQLRBLXpby6+yRzJtH9v kG9B7L43tLw+cOofQk= X-Virus-Scanned: Debian amavisd-new at fripost.org Content-Disposition: inline In-Reply-To: <20150930154337.GC13149@example.net> Xref: news.gmane.org gmane.linux.lib.musl.general:8589 Archived-At: On Wed, Sep 30, 2015 at 05:43:37PM +0200, u-uy74@aetey.se wrote: > So either this was an artifact of a "somehow specifically corrupt" > kernel or this is some assumption which blows up, given a certain state > (not necessarily corrupt) of the kernel. I believe more in the latter > (is there a contract about how/where the kernel shall allocate the > thread stacks?). > > 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. > > Unfortunately, in practical terms: no misbehaviour to analyze for > the moment. 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]] Convert from one encoding to another. --encoding FROM --from FROM use FROM as source encoding name --to TO use TO as target encoding name -i FILE read from FILE -o FILE print output to FILE --reverse swap FROM and TO encodings --help print this help, then exit --version print version number, then exit `-' as a file name argument can be used to refer to stdin or stdout. # 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