Here is my gnarly C test case to make this happen on Linux: __attribute__((noreturn)) void exit_manyarg(int, int, int, int, int, int, int, int, int, int); struct ByVal { int vals[10]; }; struct ByVal getbyval(); void make_push_unprofitable(struct ByVal); void bar(); extern int gv1, gv2, gv3, gv4, gv5, gv6, gv7, gv8, gv9, gv10; int foo(int c) { if (c) exit_manyarg(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); make_push_unprofitable(getbyval()); make_push_unprofitable(getbyval()); make_push_unprofitable(getbyval()); return 0; } $ clang -S -O2 check.c --target=x86_64-linux -o - -fPIC ... callq exit_manyarg@PLT subq $32, %rsp This only happens with a noreturn function has stack arguments, which is rare for Linux. However for Win64, the caller must always reserve 32 bytes of stack space. Currently this bug doesn't happen on Win64, but I plan to make it stop setting TrapUnreachable, which will make it happen for all noreturn calls, and then it will matter.
I thought r270109 was supposed to prevent this, not the other way around :-/
r370409 should fix these cases. I think when you were working on r270109 we were measuring code size of i686-windows-msvc for chromium, which uses /Oy- to preserve frame pointers, so the stack frame was frequently not reserved, which avoided this case.