[Spice-devel] [PATCH xf86-video-qxl v2] Revise the XSpice audio processing to avoid the use of pthreads.

Christophe Fergeau cfergeau at redhat.com
Wed Oct 22 08:29:43 PDT 2014


On Wed, Oct 22, 2014 at 10:15:57AM -0500, Jeremy White wrote:
> On 10/22/2014 09:38 AM, Christophe Fergeau wrote:
> >Hey,
> >
> >There are a bunch of calloc/malloc throughout the patch with no check
> >for a NULL return, would be nice to add that.
> 
> Hmm.  I've seen this argued both ways.  One side argues that if an
> allocation is never expected to fail, that it's best to just trigger the
> resulting crash as a diagnostic.  Trying to 'handle' an error where there is
> no reasonable response can just mask the problem, or so goes the rationale.
> And these are all small allocs that really should never fail.
> 
> The code base is unclear; it seems that allocs are sometimes checked, and
> sometimes not.  It's easy to add; if you feel it's the preferred Spice
> standard, I'll add the checks.

Ah, I lean towards the "don't handle", but the few other allocs I
looked at were checking, hence the comment. If other allocs are
unchecked, feel free to keep things this way.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141022/8eae81a3/attachment.sig>


More information about the Spice-devel mailing list