https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64510
Bug ID: 64510 Summary: FAIL: go.test/test/nilptr2.go execution on non-split-stack targets Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: ubizjak at gmail dot com CC: cmang at google dot com The testcase go.test/test/nilptr2.go fails execution on non-split-stack targets: Program received signal SIGSEGV, Segmentation fault. 0x0000000000402965 in main.$nested32 () at /home/uros/gcc-svn/trunk/gcc/testsuite/go.test/test/nilptr2.go:76 76 {"*bigstructp", func() { use(*bigstructp) }}, The test wants to pass ~128MB structure on the stack, resulting in (x86_64-linux-gnu, CentOS 5.11): (gdb) disass Dump of assembler code for function main.$nested32: 0x0000000000402910 <+0>: sub $0x8000058,%rsp 0x0000000000402917 <+7>: mov 0x204fa2(%rip),%rsi # 0x6078c0 <main.bigstructp> 0x000000000040291e <+14>: test %rsi,%rsi 0x0000000000402921 <+17>: je 0x402960 <main.$nested32+80> 0x0000000000402923 <+19>: lea 0x10(%rsp),%rdi 0x0000000000402928 <+24>: mov $0x8000038,%edx 0x000000000040292d <+29>: callq 0x401bc8 <memcpy@plt> 0x0000000000402932 <+34>: mov $0x8000038,%esi 0x0000000000402937 <+39>: mov $0x404680,%edi 0x000000000040293c <+44>: callq 0x401b28 <__go_new@plt> 0x0000000000402941 <+49>: lea 0x10(%rsp),%rsi 0x0000000000402946 <+54>: mov $0x8000038,%edx 0x000000000040294b <+59>: mov %rax,%rdi 0x000000000040294e <+62>: callq 0x401bc8 <memcpy@plt> 0x0000000000402953 <+67>: add $0x8000058,%rsp 0x000000000040295a <+74>: retq 0x000000000040295b <+75>: nopl 0x0(%rax,%rax,1) 0x0000000000402960 <+80>: mov $0x6,%edi => 0x0000000000402965 <+85>: mov %rsi,0x8(%rsp) Please see the stack adjustment at the top: sub $0x8000058,%rsp The testcase also fails for -m32, fails on alpha [1] (with the same failure), sparc [2], powerpc [3], powerpc64le [4] and probably other non-split-stack targets. [1] https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg00400.html [2] https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg00354.html [3] https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg00477.html [4] https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg00480.html