public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug go/59433] [4.9 regression] Many 64-bit Go tests SEGV on Solaris Date: Tue, 10 Dec 2013 13:30:00 -0000 [thread overview] Message-ID: <bug-59433-4-6oczJT2luD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59433-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59433 --- Comment #1 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- I've found what's going on: when I look at the failing bufio test, gdb prints gdb) p rfds Cannot access memory at address 0xfffffd7ffe0f9f00 With pmap, I see the following mappings: FFFFFD7FFDE00000 2048K rw--- [ anon ] FFFFFD7FFE101000 4K rw--R [ stack tid=2 ] FFFFFD7FFE110000 64K rw--- [ anon ] I.e. the thread stack starts off with just 4 kB, but rfds is 0x7100 bytes from the top of the stack, way beyond the initial allocation and thus unmapped. Each fd_set is 8 kB for 64-bit, so the stack consumption in netpoll_select.c (runtime_netpoll) is way out of bounds. As a quick hack, I've increased the initial stack size to StackMin: diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -185,7 +185,7 @@ runtime_newosproc(M *mp) if(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) != 0) runtime_throw("pthread_attr_setdetachstate"); - stacksize = PTHREAD_STACK_MIN; + stacksize = StackMin /* PTHREAD_STACK_MIN */; // With glibc before version 2.16 the static TLS size is taken // out of the stack size, and we get an error or a crash if which lets all but os/user PASS on i386-pc-solaris2.10 and sparc-sun-solaris2.11. Rainer
next prev parent reply other threads:[~2013-12-10 13:30 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-12-09 15:46 [Bug go/59433] New: " ro at gcc dot gnu.org 2013-12-09 15:47 ` [Bug go/59433] " ro at gcc dot gnu.org 2013-12-10 13:30 ` ro at CeBiTec dot Uni-Bielefeld.DE [this message] 2013-12-17 18:31 ` jakub at gcc dot gnu.org 2014-01-08 0:42 ` ian at gcc dot gnu.org 2014-01-08 0:43 ` ian at airs dot com 2014-01-09 12:50 ` ro at CeBiTec dot Uni-Bielefeld.DE 2014-01-09 14:30 ` ro at CeBiTec dot Uni-Bielefeld.DE
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59433-4-6oczJT2luD@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).