Date: Mon, 26 May 2014 21:36:22 +1000 From: Peter Jeremy <peter@rulingia.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-amd64@freebsd.org Subject: Re: i386 Go programs crash on amd64 Message-ID: <20140526113622.GB96083@server.rulingia.com> In-Reply-To: <20140524074101.GI74331@kib.kiev.ua> References: <20140523225300.GA14433@server.rulingia.com> <537FD853.3000505@wemm.org> <537FD9A2.2010607@wemm.org> <20140523233444.GH74331@kib.kiev.ua> <20140524033944.GA96083@server.rulingia.com> <20140524074101.GI74331@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--UHN/qo2QbUvPLonB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2014-May-24 10:41:01 +0300, Konstantin Belousov <kostikbel@gmail.com> wr= ote: >> >Provide the minimal test case. >>=20 >> The following go program, compiled on i386 and run on amd64 will die >> with a segmentation violation or bus error: >> ------- >> package main >>=20 >> import "fmt" >>=20 >> 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. --=20 Peter Jeremy --UHN/qo2QbUvPLonB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJTgyc2XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0nB4P/i3uwwBkS3mae1OJsp1ua7Sn gErRNOqC6ZsbEKjn+Z53etj+BxrtDxzBT3uQuL6XNoz//9e7ReyJVxpF5tvEbLR2 Ba4lAV3pBiB/CuxfZxygCHf4JG4kcjc7rm8WIhseEuLBK5vEKT4mii1xDoubPpvq mwEzjGtplsV7RHwFvwR5/EkthOPyFKTSWdMYxM5wQzgU05SNrvnfzaPBlrgIcT6Y Wb5lzR7FN/VnV7u8vtentu7GX6Iielkg4Ln0NSpmB4hebyhAxXgMxJF5HH/mliRk NHQIgafRvC24XX6eBkJkywsq6RHKiBZXB2czTrNYNJ5pU4xWkhOesQ0v/dHG4W9s d1s0pRLEJfyjdVMGPUjXASaotJkHR/JAERl2hxBcu2uDVKbCwYNkJ2rKc1bHtlsW kF62QsPT48q2NGsbsVzm+38mPdn/UIwiAsR7P7L4HA0lpBj2mkF1FyATpshx635k vrUn4A/x7KSJsvUmSojaysM79PxJKK6heUT/ViSXGvh3acDJ5xZErFwLHeW3D3NI g1JBYOVO01HgrgMeHxlk+ZV6MrHO041+sVN09zeKwqaR4Zu8vE4xypYvK1Blx6oA SeauDMIUpMVaNKbi8xwW6QQHVz2/Ox11hh90mORw7O1hGDQr0yuQFG9J/OJZAV6n XyfqFG89NvjlvSUwxW/D =3g2P -----END PGP SIGNATURE----- --UHN/qo2QbUvPLonB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140526113622.GB96083>