linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chen, Rong A" <rong.a.chen@intel.com>
To: Richard Fitzgerald <rf@opensource.cirrus.com>,
	Petr Mladek <pmladek@suse.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>,
	- <patches@opensource.cirrus.com>
Subject: Re: [kbuild-all] Re: lib/test_scanf.c:531:1: warning: the frame size of 2080 bytes is larger than 2048 bytes
Date: Tue, 27 Jul 2021 17:01:20 +0800	[thread overview]
Message-ID: <48beec0a-a2ff-2905-fe5d-047fb744b2b4@intel.com> (raw)
In-Reply-To: <870e7908-113c-0eed-264e-8a9832202bfe@opensource.cirrus.com>



On 7/24/2021 12:15 AM, Richard Fitzgerald wrote:
> On 13/07/2021 09:21, kernel test robot wrote:
>> All warnings (new ones prefixed by >>):
>>
>>     lib/test_scanf.c: In function 'numbers_list_field_width_val_width':
>>>> lib/test_scanf.c:531:1: warning: the frame size of 2080 bytes is 
>>>> larger than 2048 bytes [-Wframe-larger-than=]
>>       531 | }
>>           | ^
>>     lib/test_scanf.c: In function 'numbers_list_field_width_typemax':
>>     lib/test_scanf.c:489:1: warning: the frame size of 2552 bytes is 
>> larger than 2048 bytes [-Wframe-larger-than=]
>>       489 | }
>>           | ^
>>     lib/test_scanf.c: In function 'numbers_list':
>>     lib/test_scanf.c:438:1: warning: the frame size of 2080 bytes is 
>> larger than 2048 bytes [-Wframe-larger-than=]
>>       438 | }
>>           | ^
>>
> 
> I haven't been able to reproduce this. I've tried these compilers:
> 
> Linaro AArch32 GCC 10.2.1 20201103(-O2 or -Os optimization): stack 
> frames < 200 bytes
> 
> Linaro ARM32 7.5-2019.12 -Os: maximum of 384 bytes
> 
> Debian 6.3.0-18+deb9u1, x86_64 -O2: frames < 200 bytes

Hi Richard,

I installed gcc-10-arm-linux-gnueabi on Debian and can't reproduce the 
warning too.

> 
> (The GCC fetched with the reproduction instructions from the krobot
> report doesn't work on my Debian system.)

I have confirmed that the gcc compiler used by the bot can reproduce the 
warning, which problem on your Debian system? we can improve the 
reproduce tool if there's more information.

Best Regards,
Rong Chen

> 
> The sizes reported by the krobot are the total of all stack variable in
> the function, but they all have limited scope. Obviously my GCC versions
> are optimizing by effectively making a union of stack variable that are
> used in different scope. So presumably the GCC version used by krobot is
> missing this optimization. That feels to me more like a compiler bug if
> it is allocating 12 times more stack than is actually necessary for the
> function.
> 
> Output from my 10.2.1 compiler (-O2):
> 
> lib/test_scanf.c: In function 'numbers_list_field_width_val_width':
> lib/test_scanf.c:530:1: warning: the frame size of 176 bytes is larger 
> than 128 bytes [-Wframe-larger-than=]
>    530 | }
>        | ^
> lib/test_scanf.c: In function 'numbers_list_field_width_typemax':
> lib/test_scanf.c:488:1: warning: the frame size of 184 bytes is larger 
> than 128 bytes [-Wframe-larger-than=]
>    488 | }
>        | ^
> lib/test_scanf.c: In function 'numbers_list':
> lib/test_scanf.c:437:1: warning: the frame size of 168 bytes is larger 
> than 128 bytes [-Wframe-larger-than=]
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org

      reply	other threads:[~2021-07-27  9:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13  8:21 lib/test_scanf.c:531:1: warning: the frame size of 2080 bytes is larger than 2048 bytes kernel test robot
2021-07-23 16:15 ` Richard Fitzgerald
2021-07-27  9:01   ` Chen, Rong A [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48beec0a-a2ff-2905-fe5d-047fb744b2b4@intel.com \
    --to=rong.a.chen@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=patches@opensource.cirrus.com \
    --cc=pmladek@suse.com \
    --cc=rf@opensource.cirrus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).