This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GCC's -fsplit-stack disturbing Mach's vm_allocate
- From: Svante Signell <svante dot signell at gmail dot com>
- To: Samuel Thibault <samuel dot thibault at gnu dot org>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, Ian Lance Taylor <iant at google dot com>, gcc-patches at gcc dot gnu dot org, bug-hurd at gnu dot org, fotis dot koutoulakis at gmail dot com, Roland McGrath <roland at hack dot frob dot com>
- Date: Thu, 24 Apr 2014 10:39:10 +0200
- Subject: Re: GCC's -fsplit-stack disturbing Mach's vm_allocate
- Authentication-results: sourceware.org; auth=none
- References: <8761x7nkks dot fsf at kepler dot schwinge dot homeip dot net> <20130621231655 dot 24D002C14C at topped-with-meat dot com> <87r4fumx2g dot fsf at kepler dot schwinge dot homeip dot net> <CAKOQZ8wZOf8MBdVKiyDcggFBs3A48+QckAoB7XJm+b+E3rkAxQ at mail dot gmail dot com> <87ip10o90k dot fsf at kepler dot schwinge dot homeip dot net> <20140404191416 dot GG5350 at type> <1397027146 dot 1276 dot 29 dot camel at G3620 dot my dot own dot domain> <87fvln6jjp dot fsf at schwinge dot name> <20140416220345 dot GZ5545 at type dot youpi dot perso dot aquilenet dot fr> <20140418080311 dot GA5626 at type dot bordeaux dot inria dot fr>
- Reply-to: svante dot signell at gmail dot com
On Fri, 2014-04-18 at 10:03 +0200, Samuel Thibault wrote:
> Samuel Thibault, le Thu 17 Apr 2014 00:03:45 +0200, a écrit :
> > Thomas Schwinge, le Wed 09 Apr 2014 09:36:42 +0200, a écrit :
> > > Well, the first step is to verify that TARGET_THREAD_SPLIT_STACK_OFFSET
> > > and similar configury is correct for the Hurd,
> >
> > I have added the corresponding field, so we can just use the same offset
> > as on Linux.
>
> I have uploaded packages on http://people.debian.org/~sthibault/tmp/ so
> Svante can try setting TARGET_THREAD_SPLIT_STACK_OFFSET to 0x30 with
> them.
Status report:
- Without split stack enabled around 70 libgo tests pass and 50 fails,
most of them with a segfault.
- Enabling split stack and using the libc Samuel built all 122 libgo
tests fail with a segfault.
- In both cases simple go programs work, like hello+sqrt.go below.
- The segfault seems to be located at the same code piece according to
gdb (maybe due to exception handling)
cat hello+sqrt.go
package main
import (
"fmt"
)
func main() {
fmt.Printf("Hello, world. Sqrt(2) = %v\n", Sqrt(2))
}
I have not been able to use a local go library function, e.g. package
newmath, and the go frontend is not yet available for GNU/Hurd.
However, it seems that something triggers the segfaults when running
make -C build/i486-gnu/libgo check (both with and w/o split-stack)
while setting the keep parameter in ./src/libgo/testsuite/gotest
and running them manually some of them work?? As a first glance, about
the same number of tests succeeds with and w/o split stack :) Some of
the failing tests still seems random, sometimes they pass, sometimes
they fail.