qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c
Date: Fri, 4 Jan 2008 17:44:05 +0000
User-agent: KMail/1.9.7

On Friday 04 January 2008, Markus Hitter wrote:
> Am 03.01.2008 um 15:02 schrieb Paul Brook:
> > Having to check every return value is extremely tedious and (as
> > you've proved) easy to miss.
>
> Checking every return value is a measure for programming reliable code.

Never failing is even more reliable.

> > If the allocation fails we don't have any viable alternatives, so
> > we may as well stop right there.
>
> Stop != segfault? 

Yes.

> What about a meaningful exit message? 

"Out of memory" is a fairly comprehensive description of the problem.
In fact I'd say it's much more informative than "<random widget the user 
doesn't know or care about> failed to initialize".

Paul




reply via email to

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