[vlc-devel] Re: vlc: svn commit r19276 (jpsaman)

Jean-Paul Saman jean-paul.saman at planet.nl
Sat Mar 10 19:51:32 CET 2007


Rémi Denis-Courmont wrote:
> Le samedi 10 mars 2007 18:42, Subversion daemon a écrit :
>> r19276 | jpsaman | 2007-03-10 17:42:21 +0100 (Sat, 10 Mar 2007) | 1
>> line Changed paths:
>>    M /trunk/modules/misc/playlist/m3u.c
>>
>> Sanity check
> 
> This is utterly useless. VLC assumes that table allocations succeeds, 
> and will crash if they don't. And even if it did not, the right place 
> to check for failure, is straight after the allocation, not at a 
> completely differently place in the code.
> 
> Removing assertions and/or adding useless sanity checks only hides bugs; 
> it does not solve them at all. That's very BAD.
> 
Not checking the return of p_current results in a Segmentation fault 
because the code is then accessing an invalid pointer. What would be the 
right solution here then according to you? Using assert(p_current)?

I disagree with always crashing, especially in releases because it would 
give VLC a bad name as being terribly unstable. Asserts are useful in 
testing only.

-- my 2cts

Gtz,
Jean-Paul Saman.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list