This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch8.diff updated Was: Re: GCC's -fsplit-stack disturbing Mach's vm_allocate
- From: Ian Lance Taylor <iant at google dot com>
- To: svante dot signell at gmail dot com
- Cc: Samuel Thibault <samuel dot thibault at gnu dot org>, Thomas Schwinge <thomas at codesourcery dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, bug-hurd <bug-hurd at gnu dot org>, Roland McGrath <roland at hack dot frob dot com>
- Date: Wed, 21 May 2014 09:02:42 -0700
- Subject: Re: patch8.diff updated Was: Re: GCC's -fsplit-stack disturbing Mach's vm_allocate
- Authentication-results: sourceware.org; auth=none
- References: <1399027556 dot 8487 dot 12 dot camel at PackardBell-PC> <20140502105234 dot GM6577 at type> <1399363609 dot 13092 dot 29 dot camel at G3620 dot my dot own dot domain> <20140506125157 dot GH5788 at type dot bordeaux dot inria dot fr> <1399381520 dot 13092 dot 67 dot camel at G3620 dot my dot own dot domain> <20140506130755 dot GL5788 at type dot bordeaux dot inria dot fr> <1399382738 dot 13092 dot 70 dot camel at G3620 dot my dot own dot domain> <20140506132605 dot GD1010 at type dot bordeaux dot inria dot fr> <1399450727 dot 13092 dot 106 dot camel at G3620 dot my dot own dot domain> <1400227385 dot 10012 dot 98 dot camel at G3620 dot my dot own dot domain> <20140520232704 dot GM5623 at type dot youpi dot perso dot aquilenet dot fr> <1400658428 dot 4830 dot 88 dot camel at G3620 dot my dot own dot domain>
On Wed, May 21, 2014 at 12:47 AM, Svante Signell
<svante.signell@gmail.com> wrote:
> On Wed, 2014-05-21 at 01:27 +0200, Samuel Thibault wrote:
>> Svante Signell, le Fri 16 May 2014 10:03:05 +0200, a Ãcrit :
>> > is used in gcc-4.9-4.9.0/src/libgo/go/net/fd_unix.go:
>> > func dupCloseOnExec(fd int) (newfd int, err error) {
>> > if atomic.LoadInt32(&tryDupCloexec) == 1 && syscall.F_DUPFD_CLOEXEC!=0 {
>> > r0, _, e1 := syscall.Syscall(syscall.SYS_FCNTL, uintptr(fd),
>> > syscall.F_DUPFD_CLOEXEC, 0)
>>
>> That code can not work as it is, fcntl is not a system call on
>> GNU/Hurd. Why isn't gccgo just using the C fcntl function? That one
>> will just work and be portable.
>
> I don't know, I'm not a go developer. Ask Ian.
It's a bug. That code, like most of libgo, is simply copied from the
master Go library, and I never noticed the direct use of
syscall.Syscall here.
Ian