This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] syslog() segv fix under memory shortage


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]