|
Message-ID: <20150525143503.GC20259@port70.net> Date: Mon, 25 May 2015 16:35:04 +0200 From: Szabolcs Nagy <nsz@...t70.net> To: musl@...ts.openwall.com Subject: Re: ppc soft-float regression * Alexander Monakov <amonakov@...ras.ru> [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).
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.