This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] syslog() segv fix under memory shortage
- From: Richard Henderson <rth at twiddle dot net>
- To: GOTO Masanori <gotom at debian dot or dot jp>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Thu, 15 Apr 2004 10:07:40 -0700
- Subject: Re: [PATCH] syslog() segv fix under memory shortage
- References: <81oepttrwk.wl@omega.webmasters.gr.jp>
On Thu, Apr 15, 2004 at 08:14:03PM +0900, GOTO Masanori wrote:
> - __libc_cleanup_push (free, buf);
> + if (__builtin_expect(need_free, 1))
> + __libc_cleanup_push (free, buf);
...
> - __libc_cleanup_pop (0);
> + if (__builtin_expect(need_free, 1))
> + __libc_cleanup_pop (0);
Cleanup push/pop cannot be nested like this.
Frankly, I'm surprised this even compiles.
r~