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:

   0x0000000010001008 <+8>:     cmpdi   r3,0
   0x000000001000100c <+12>:    beq     0x10001040 <main.count+64>
   0x0000000010001010 <+16>:    mflr    r0
   0x0000000010001014 <+20>:    std     r0,16(r1)
   0x0000000010001018 <+24>:    stdu    r1,-32(r1)
   0x000000001000101c <+28>:    ld      r3,0(r3)
   0x0000000010001020 <+32>:    bl      0x10001008 <main.count+8>


** Attachment added: "peano.go"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+attachment/4079310/+files/peano.go

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1304754

Title:
  gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to