Le sam. 4 juil. 2020 à 15:30, Kamil Rytarowski <[email protected]> a écrit : > > Kamil - what's the difference in gcc between -Wframe-larger-than= and > > -Wstack-size= ? > > > > -Wstack-size doesn't exist?
Sorry, meant -Wstack-usage= > > I see according to gcc documentation -Wframe-larger-than doesn't count > > size for alloca() and variable-length arrays, which makes it much less > > useful than -Wstack-usage. > > > > It's not a problem. > > Whenever alloca or VLA is in use, it's already breaking the stack > protector. There are a few exceptions registered in sys/conf/ssp.mk. > > We could add -Walloca -Wvla for USE_SSP=yes builds to catch quickly > inappropriate usage (frequently violated by code optimizer). It's already not used in our kernel code, I checked and I found it used only in some arch-specific stand/ code. So -Walloca should be safe to turn on unconditionally, regardless of SSP. Unless the compiler emits alloca() calls itself. Jaromir
