Based on the fail, I took a look at how gccgo handles stacks. It relies on the split stack feature in gold, which doesn't appear to be implemented for ppc64.
Running one of the go recursion testcases (attached) shows what happens when we run out of stack and don't have the split stack feature to save us:
Based on the fail, I took a look at how gccgo handles stacks. It relies on the split stack feature in gold, which doesn't appear to be implemented for ppc64.
Running one of the go recursion testcases (attached) shows what happens when we run out of stack and don't have the split stack feature to save us:
#gccgo -g -O2 -o peano peano.go
# ./peano
Segmentation fault
And we get the setup_rt_frame error in dmesg:
peano[4538]: bad frame in setup_rt_frame: 000000c20ff7f000 nip 0000000010001018 lr 0000000010001024
As expected, we are just continually recurse without checking out stack pointer for overflow:
0x0000000010 001008 <+8>: cmpdi r3,0 00100c <+12>: beq 0x10001040 <main.count+64> 001010 <+16>: mflr r0 001014 <+20>: std r0,16(r1) 001018 <+24>: stdu r1,-32(r1) 00101c <+28>: ld r3,0(r3) 001020 <+32>: bl 0x10001008 <main.count+8>
0x0000000010
0x0000000010
0x0000000010
0x0000000010
0x0000000010
0x0000000010