From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7758 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: ppc soft-float regression Date: Mon, 25 May 2015 17:45:32 +0300 (MSK) Message-ID: References: <20150518201422.GY17573@brightrain.aerifal.cx> <20150518220731.GA31132@euler> <20150522062346.GK17573@brightrain.aerifal.cx> <20150524030809.GA19134@brightrain.aerifal.cx> <20150525003648.GO17573@brightrain.aerifal.cx> <1432535489.2715.1.camel@inria.fr> <20150525065756.GR17573@brightrain.aerifal.cx> <1432539884.7942.1.camel@inria.fr> <20150525132631.GB20259@port70.net> <20150525143503.GC20259@port70.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 1432565163 12991 80.91.229.3 (25 May 2015 14:46:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2015 14:46:03 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7770-gllmg-musl=m.gmane.org@lists.openwall.com Mon May 25 16:45:58 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 1YwtdR-0002jE-ED for gllmg-musl@m.gmane.org; Mon, 25 May 2015 16:45:45 +0200 Original-Received: (qmail 25716 invoked by uid 550); 25 May 2015 14:45:43 -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 25695 invoked from network); 25 May 2015 14:45:43 -0000 In-Reply-To: <20150525143503.GC20259@port70.net> User-Agent: Alpine 2.11 (LNX 23 2013-08-11) Xref: news.gmane.org gmane.linux.lib.musl.general:7758 Archived-At: On Mon, 25 May 2015, Szabolcs Nagy wrote: > * Alexander Monakov [2015-05-25 16:40:46 +0300]: > > > > > > currently a libc call always uses less than 10K stack(*) > > > but the guaranteed limit is not documented (16K limit is > > > fine i guess). > > > > Not true: fmt_fp consumes more that LDBL_MAX_EXP bytes, which is 16384 on x86 > > and aarch64. As I recall, there's another function with >16K static stack > > usage in the resolver, but I forget where exactly. > > note the /9 > > uint32_t big[(LDBL_MANT_DIG+28)/29 + 1 // mantissa expansion > + (LDBL_MAX_EXP+LDBL_MANT_DIG+28+8)/9]; // exponent expansion > > you can compile musl with -fstack-usage and analyze > the output (i did that once on i386) and verify that > all stack usage is <10K (some functions have vla or > recursion where verification is harder) > > (the large worst-case stack users are printf, scanf, > glob, execl, the dynamic loader does not use that much > stack: it keeps some file names and elf header in buffers > but it should use < 3K). My mistake. Most likely I was misremembering. Looking at my old logs, I see floatscan.c:decfloat and netlink.c:__netlink_enumerate, which use >8K (but less than 16K) stack. Alexander