On 2014-May-24 10:41:01 +0300, Konstantin Belousov <[email protected]> wrote: >> >Provide the minimal test case. >> >> The following go program, compiled on i386 and run on amd64 will die >> with a segmentation violation or bus error: >> ------- >> package main >> >> import "fmt" >> >> func main() { >> fmt.Println("Hello World") >> } >> ------- >No, this is not consumable. > >I need a self-contained minimal example written in C/asm.
Actually, I've found that
--------
package main
import "syscall"
func main() { syscall.Write(1, []byte("Hello World\n")) }
--------
also crashes ~66 syscalls after the first sysarch(2) call. That
reduces the binary to 520K (go reports this is 50K lines of assembler).
>If this is too hard to produce, give the the self-contained
>binary, again as small as possible (small by comparing the
>number of syscalls before the issue manifests itself).
I've uploaded the source, binary and disassembly to
freefall:~peterj/write{.go,,.S} (and verified it crashes).
If I get time, I'll see if I can strip some of the support code out of
Go to shrink it further.
--
Peter Jeremy
pgp4BZhTk0VMY.pgp
Description: PGP signature
