Re: alloca (0) in include/libiberty.h

2019-06-11 Thread Jakub Jelinek
On Tue, Jun 11, 2019 at 03:58:27PM +, Michael Matz wrote: > On Tue, 11 Jun 2019, Martin Liška wrote: > > > I see 3 occurrences of the alloca (0) in libiberty/regex.c, but there are > > properly > > guarded within: > > > > # ifdef C_ALLOCA > > alloca (0); > > # endif > > > > and then

Re: alloca (0) in include/libiberty.h

2019-06-11 Thread Michael Matz
Hi, On Tue, 11 Jun 2019, Martin Liška wrote: > I see 3 occurrences of the alloca (0) in libiberty/regex.c, but there are > properly > guarded within: > > # ifdef C_ALLOCA > alloca (0); > # endif > > and then I noticed 2 more occurrences in gdb that break build right now: > >

Re: alloca (0) in include/libiberty.h

2019-06-11 Thread Martin Liška
On 6/11/19 9:49 AM, Martin Liška wrote: > gdb/regcache.c: alloca (0); > gdb/top.c: alloca (0); There's a PR for these: https://sourceware.org/bugzilla/show_bug.cgi?id=24653 Martin

Re: alloca (0) in include/libiberty.h

2019-06-11 Thread Martin Liška
On 6/10/19 1:54 PM, Andrew Haley wrote: > On 6/10/19 8:24 AM, Martin Liška wrote: > >> I've just noticed that we have couple of alloca (0) in libiberty: >> >> #ifndef REGEX_MALLOC >> # ifdef C_ALLOCA >> alloca (0); >> # endif >> #endif >> >> If I'm correct the value 0 has a special meaning

Re: alloca (0) in include/libiberty.h

2019-06-10 Thread Jeff Law
On 6/10/19 5:54 AM, Andrew Haley wrote: > On 6/10/19 8:24 AM, Martin Liška wrote: > >> I've just noticed that we have couple of alloca (0) in libiberty: >> >> #ifndef REGEX_MALLOC >> # ifdef C_ALLOCA >> alloca (0); >> # endif >> #endif >> >> If I'm correct the value 0 has a special meaning

Re: alloca (0) in include/libiberty.h

2019-06-10 Thread Andrew Haley
On 6/10/19 8:24 AM, Martin Liška wrote: > I've just noticed that we have couple of alloca (0) in libiberty: > > #ifndef REGEX_MALLOC > # ifdef C_ALLOCA > alloca (0); > # endif > #endif > > If I'm correct the value 0 has a special meaning that tells a C library > to clean up all previous

alloca (0) in include/libiberty.h

2019-06-10 Thread Martin Liška
Hi. I've just noticed that we have couple of alloca (0) in libiberty: #ifndef REGEX_MALLOC # ifdef C_ALLOCA alloca (0); # endif #endif If I'm correct the value 0 has a special meaning that tells a C library to clean up all previous alloca allocations. man alloca does not document the