Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 20 Feb 2019 20:11:51 +0100
From: Markus Wichmann <>
Subject: Re: Stdio resource usage

On Wed, Feb 20, 2019 at 12:34:49PM -0600, A. Wilcox wrote:
> On 02/20/19 09:47, Markus Wichmann wrote:
> > It appears as though at least gcc 8 is no longer as inline happy as it
> > once was.
> I have 0 experience with gcc8, but have you tried explicitly asking?
> These CFLAGS look useful:
> -finline-functions
> -finline-functions-called-once
> -finline-small-functions
> Best to you and yours,
> --arw
> -- 
> A. Wilcox (awilfox)
> Project Lead, Adélie Linux

For one, that doesn't count, since the whole purpose was to try to
trigger the problem inadvertantly. For two, according to the manpage:

| -finline-small-functions
|    [...]
|    Enabled at level -O2.
|    [...]
|    Enabled at level -O3.
|    [...]
|    Enabled at levels -O1, -O2, -O3, and -Os.

I have no idea what the purpose of the enumeration in the last one is,
since the levels are supposed to be cumulative, with -Os being on top of
level 1. Anyway, it appears I inadvertantly *did* try all those

Though I did get curious, and decided to check if my method even works.
I'm running objdump on vfprintf.o, and check for the first stack
allocation in the functions. And let the following be my validation:
clang will inline fmt_fp into printf_core at levels -Os and -O3. And
printf_core will allocate 8k of 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.