qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH v2] loader: don't call realloc(non_null, 0) when


From: Michael S. Tsirkin
Subject: [Qemu-devel] Re: [PATCH v2] loader: don't call realloc(non_null, 0) when no symbols are present
Date: Tue, 29 Dec 2009 18:34:33 +0200
User-agent: Mutt/1.5.19 (2009-01-05)

On Tue, Dec 29, 2009 at 05:26:50PM +0100, Aurelien Jarno wrote:
> On Tue, Dec 29, 2009 at 05:36:40PM +0200, Michael S. Tsirkin wrote:
> > On Mon, Dec 28, 2009 at 09:20:20PM +0100, Aurelien Jarno wrote:
> > > According to C99, realloc(non_null, 0) != free(non_null), that's why
> > > it is forbidden in QEMU.
> > > 
> > > When there are no symbols, nsyms equals to 0. Free the syms structure
> > > and set it to NULL instead of reallocating it with a size of 0.
> > > 
> > > This fixes -kernel with stripped kernels.
> > > 
> > > Signed-off-by: Aurelien Jarno <address@hidden>
> > 
> > I didn't know, you live and learn. FWIW
> 
> Can you please stop being annoying about that? I submit non-trivial 
> patches like this one before committing them. This is nothing new.

Oh, this is a misunderstanding, sorry.  I really meant that I lived
another day and learned about realloc(p, 0) being implementation
dependend. That is all.

> -- 
> Aurelien Jarno                                GPG: 1024D/F1BCDB73
> address@hidden                 http://www.aurel32.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]