Re: GCC's -fsplit-stack disturbing Mach's vm_allocate
- To: Svante Signell <svante.signell@gmail.com>
- Cc: debian-hurd@lists.debian.org
- Subject: Re: GCC's -fsplit-stack disturbing Mach's vm_allocate
- From: Samuel Thibault <samuel.thibault@gnu.org>
- Date: Tue, 15 Apr 2014 03:42:01 +0200
- Message-id: <[🔎] 20140415014201.GV27172@type.youpi.perso.aquilenet.fr>
- Mail-followup-to: Svante Signell <svante.signell@gmail.com>, debian-hurd@lists.debian.org
- In-reply-to: <1397489474.32143.46.camel@G3620.my.own.domain>
- References: <20130621231655.24D002C14C@topped-with-meat.com> <87r4fumx2g.fsf@kepler.schwinge.homeip.net> <CAKOQZ8wZOf8MBdVKiyDcggFBs3A48+QckAoB7XJm+b+E3rkAxQ@mail.gmail.com> <87ip10o90k.fsf@kepler.schwinge.homeip.net> <20140404191416.GG5350@type> <1397027146.1276.29.camel@G3620.my.own.domain> <87fvln6jjp.fsf@schwinge.name> <20140411215144.GX7323@type.home.polyno.me> <20140411230449.GB7323@type.home.polyno.me> <1397489474.32143.46.camel@G3620.my.own.domain>
Svante Signell, le Mon 14 Apr 2014 17:31:14 +0200, a écrit :
> On Sat, 2014-04-12 at 01:04 +0200, Samuel Thibault wrote:
> > Samuel Thibault, le Fri 11 Apr 2014 23:51:44 +0200, a écrit :
> > > So, do we really want to let munmap poke a hole at address 0 and thus
> > > let further vm_map() return address 0?
> >
> > i.e. we could apply this:
> >
> > diff --git a/sysdeps/mach/munmap.c b/sysdeps/mach/munmap.c
> > index 57d99f9..a46e3f1 100644
> > --- a/sysdeps/mach/munmap.c
> > +++ b/sysdeps/mach/munmap.c
> > @@ -27,6 +27,11 @@ int
> > __munmap (__ptr_t addr, size_t len)
> > {
> > kern_return_t err;
> > + if (addr == 0)
> > + {
> > + errno = EINVAL;
> > + return -1;
> > + }
> > if (err = __vm_deallocate (__mach_task_self (),
> > (vm_address_t) addr, (vm_size_t) len))
> > {
>
> Do you have a elibc/libc.so built with this patch applied somewhere?
Yes, I have put a patched 2.18 on
http://people.debian.org/~sthibault/tmp/libc.so
Samuel
Reply to: