On Thu, Apr 03, 2025 at 02:08:28PM +0200, Michal Prívozník via Devel wrote: > On 4/2/25 19:24, Roman Bogorodskiy wrote: > > The 'plain' optimization type also triggers the clang stack frame size > > issues, so increase limit for it as well. > > > > Signed-off-by: Roman Bogorodskiy <bogorods...@gmail.com> > > --- > > meson.build | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/meson.build b/meson.build > > index 56823ca25b..0a402a19a2 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -259,7 +259,7 @@ alloc_max = run_command( > > stack_frame_size = 2048 > > > > # clang without optimization enlarges stack frames in certain corner cases > > -if cc.get_id() == 'clang' and get_option('optimization') == '0' > > +if cc.get_id() == 'clang' and get_option('optimization') in ['plain', '0'] > > stack_frame_size = 4096 > > endif > > > > Funny, with clang I hit this issue for all possible values of > --optimization {plain,0,g,1,2,3,s}. > > I worry this is clang version dependent. Should we just drop check for > 'optimization' argument altogether?
We originally picked 2k default in commit 42bc76cdb8486ef502200f3bce9e3faebdd78103 Author: Peter Krempa <pkre...@redhat.com> Date: Mon Sep 5 14:38:09 2022 +0200 build: Decrease maximum stack frame size to 2048 After recent cleanups we can now restrict the maximum stack frame size to 2k. guess we must be just a bit too aggressive with certain compiler scenarios - with various hardening countermeasures compilers may choose to apply, stack size can be bigger than we might otherwise expect. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|