Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-07 Thread Ian Lance Taylor via Gcc-patches
On Tue, Apr 7, 2020 at 3:33 AM Jakub Jelinek wrote: > > On Tue, Apr 07, 2020 at 12:19:45PM +0200, Richard Biener via Gcc-patches > wrote: > > On Fri, Apr 3, 2020 at 11:59 PM Ian Lance Taylor via Gcc-patches > > wrote: > > > > > > The split-stack code invokes mmap and munmap with a limited amount

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-07 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 07, 2020 at 12:19:45PM +0200, Richard Biener via Gcc-patches wrote: > On Fri, Apr 3, 2020 at 11:59 PM Ian Lance Taylor via Gcc-patches > wrote: > > > > The split-stack code invokes mmap and munmap with a limited amount of > > stack space. That is fine when the functions just make a sy

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-07 Thread Richard Biener via Gcc-patches
On Fri, Apr 3, 2020 at 11:59 PM Ian Lance Taylor via Gcc-patches wrote: > > The split-stack code invokes mmap and munmap with a limited amount of > stack space. That is fine when the functions just make a system call, > but it's not fine when programs use LD_PRELOAD or linker tricks to add > hook

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-04 Thread Eric Botcazou
> I committed this patch. Works for me, thanks for the quick fix! -- Eric Botcazou

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-04 Thread Ian Lance Taylor via Gcc-patches
On Sat, Apr 4, 2020 at 1:35 PM H.J. Lu wrote: > > On Sat, Apr 4, 2020 at 1:28 PM Eric Botcazou wrote: > > > > > Hmmm, sorry about that. Which target? x86_64? It does seem that > > > glibc consolidated mmap implementations in 2.26, but even in 2.22 I > > > see definitions for __mmap. > > > > co

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-04 Thread H.J. Lu via Gcc-patches
On Sat, Apr 4, 2020 at 1:28 PM Eric Botcazou wrote: > > > Hmmm, sorry about that. Which target? x86_64? It does seem that > > glibc consolidated mmap implementations in 2.26, but even in 2.22 I > > see definitions for __mmap. > commit fa872e1b6210e81e60d6029429f0a083b8eab26e Author: Adhemerval

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-04 Thread Eric Botcazou
> Hmmm, sorry about that. Which target? x86_64? It does seem that > glibc consolidated mmap implementations in 2.26, but even in 2.22 I > see definitions for __mmap. GNU C Library (GNU libc) stable release version 2.22 (git bbab82c25da9), by Roland McGrath et al. Copyright (C) 2015 Free Softwa

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-04 Thread Ian Lance Taylor via Gcc-patches
On Sat, Apr 4, 2020 at 10:10 AM Eric Botcazou wrote: > > > 2020-04-03 Ian Lance Taylor > > > > * generic-morestack.c: On GNU/Linux use __mmap/__munmap rather > > than mmap/munmap, to avoid hooks. > > This breaks the build of gotools for me with undefined references to __mmap > and __munmap from

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-04 Thread Eric Botcazou
> 2020-04-03 Ian Lance Taylor > > * generic-morestack.c: On GNU/Linux use __mmap/__munmap rather > than mmap/munmap, to avoid hooks. This breaks the build of gotools for me with undefined references to __mmap and __munmap from libgcc/generic-morestack.c (it is with glibc 2.22). -- Eric Botc

libgcc patch committed: Avoid hooks in split-stack code

2020-04-03 Thread Ian Lance Taylor via Gcc-patches
The split-stack code invokes mmap and munmap with a limited amount of stack space. That is fine when the functions just make a system call, but it's not fine when programs use LD_PRELOAD or linker tricks to add hooks to mmap/munmap. Those hooks may use too much stack space, leading to an obscure