Created attachment 42507 [details] reduced testcase $ cat testcase.c int main() { int a[1442]; } $ x86_64-pc-linux-gnu-gcc -fstack-clash-protection --param=stack-clash-protection-probe-interval=10 testcase.c $ ./a.out Segmentation fault In the assembly, there is a loop that never finishes (until it segfaults): ... lea r11, [rsp-5120] .LPSRL0: sub rsp, 4096 or DWORD PTR [rsp], 0 cmp rsp, r11 jne .LPSRL0 ... $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-254242-checking-yes-rtl-df-extra-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --without-cloog --without-ppl --without-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-254242-checking-yes-rtl-df-extra-nographite-amd64 Thread model: posix gcc version 8.0.0 20171030 (experimental) (GCC)
Sigh. Yet more evidence that user-configurable probing intervals is probably a bad idea...
Author: law Date: Mon Nov 6 15:51:16 2017 New Revision: 254456 URL: https://gcc.gnu.org/viewcvs?rev=254456&root=gcc&view=rev Log: PR target/82788 * config/i386/i386.c (PROBE_INTERVAL): Remove. (get_probe_interval): New functions. (ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval. (ix86_adjust_stack_and_probe): Likewise. (output_adjust_stack_and_probe): Likewise. (ix86_emit_probe_stack_range): Likewise. (ix86_expand_prologue): Likewise. PR target/82788 * gcc.dg/pr82788.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr82788.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c trunk/gcc/testsuite/ChangeLog
Fixed on the trunk this morning.