Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 25 May 2015 17:45:32 +0300 (MSK)
From: Alexander Monakov <>
Subject: Re: ppc soft-float regression

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.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.