[Maria-developers] gcc -Wframe-larger-than
Hi, Just noticed that gcc has a warning option -Wframe-larger-than=LEN that makes gcc to warn about functions with stack frames larger than LEN. Considering a recent issue when we had a 130K structure on the stack (which did overflow the stack in some cases), it may be a good idea to enable this warning with a reasonably conservative threshold, say, 16K or 32K. Regards, Sergei
Sergei Golubchik <serg@askmonty.org> writes:
Just noticed that gcc has a warning option -Wframe-larger-than=LEN that makes gcc to warn about functions with stack frames larger than LEN.
Considering a recent issue when we had a 130K structure on the stack (which did overflow the stack in some cases), it may be a good idea to enable this warning with a reasonably conservative threshold, say, 16K or 32K.
Yes, sounds like a good idea (my suggestion would be 32k, for no particular good reason). If you tried it already locally, was there anything you found that needed fixing? If not (or after fixing those), I suggest adding the -Wframe-larger-than to BUILD/SETUP.sh (in 5.1 I suppose), so we will see the warnings in those Buildbot builders that use it (there are several). - Kristian.
participants (2)
-
Kristian Nielsen
-
Sergei Golubchik