llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[Linux kernel] unknown warning option: -Wframe-larger-than=2048

Open llvmbot opened this issue 17 years ago • 9 comments

Bugzilla Link 4072
Resolution FIXED
Resolved on Jun 06, 2014 16:05
Version unspecified
OS Linux
Blocks llvm/llvm-project#4440
Reporter LLVM Bugzilla Contributor
CC @akyrtzi,@brycelelbach,@nlewycky,@qcolombet

Extended Description

The Linux kernel makes use of the -Wframe-larger-than option, to warn at build time if a stack frame is distressingly large.

llvmbot avatar Apr 25 '09 22:04 llvmbot

Fixed in clang r210293. Please file a new bug if you experience further issues.

llvmbot avatar Jun 06 '14 23:06 llvmbot

I’ve made a step toward fixing this. In clang r200931, we can now emit stack size warning, promote then to errors, etc. All of this is achieved by using the -Wframe-larger-than switch (and the related -Werror, -Wno-<>, etc., tricks).

However, at this stage of the implementation you cannot specify the stack size through that switch: you have to use a backend option: -mllvm -warn-stack-size=.

In other words, to get the warnings for a stack bigger than 2048, instead of doing -Wframe-larger-than=2048 You have to do -Wframe-larger-than -mllvm -warn-stack-size=2048

Note, that this is a transition step and that at some point the -warn-stack-size= will disappear in favor of the simpler -Wframe-larger-than=.

Note also that the current diagnostic does not demangle function names: http://llvm.org/bugs/show_bug.cgi?id=18759

qcolombet avatar Feb 06 '14 20:02 qcolombet

r128560 silences the warning about unknown option Wframe-larger-than.

So the only "warning" user gets about LLVM generating too large stack frame for some function's code is the resulting kernel Oopsing at some point when it's run?

(I assume there are differences between how large stack frames GCC & LLVM generate from the same code, so LLVM relying on GCC catching these issues probably isn't enough.)

llvmbot avatar Apr 16 '11 13:04 llvmbot

r128560 silences the warning about unknown option Wframe-larger-than.

akyrtzi avatar Mar 30 '11 20:03 akyrtzi

This can be disabled in the Linux kernel configuration. Using menuconfig (make menuconfig from the top of the kernel), select "Kernel Hacking", then "Warn for stack frames larger than (needs gcc 4.4)". Set it to 0, and it will be disabled.

brycelelbach avatar Oct 22 '10 05:10 brycelelbach

Ok.

The kernel isn't going to be unblocked for quite a while, I suspect. :)

llvmbot avatar May 03 '09 22:05 llvmbot

How else does one associate together all the Linux kernel bugs?

llvmbot avatar May 03 '09 17:05 llvmbot

Dropped block on bug 4068, this isn't "blocking" the linux kernel build, per se.

llvmbot avatar May 03 '09 11:05 llvmbot

assigned to @qcolombet

llvmbot avatar Apr 25 '09 22:04 llvmbot