[xiph-cvs] cvs commit: avl avl.c
Michael Smith
msmith at xiph.org
Sun Dec 7 18:13:08 PST 2003
On Saturday 06 December 2003 11:14, oddsock wrote:
> At 11:46 AM 12/5/2003 +1100, you wrote:
> >On Friday 05 December 2003 03:27, Ed wrote:
> > > oddsock 03/12/04 11:27:30
> > >
> > > Modified: . avl.c
> > > Log:
> > > Remove explicit exit() calls...this was possibly causing some cases
> > > of immediate UI termination without any messages...
> >
> >Err... Don't just remove those, they're neccesary internal consistency
> > checks - if they're failing, that means something is going really, badly,
> > horribly wrong. So this change is (at best) just papering over a critical
> > failure elsewhere.
>
> well, I labored over what to do here for a while.. these "internal
> consistency" checks were not really consistent and properly handled within
> avl, and since at least one module outside of icecast uses avl, I cannot
> use logging to report a message (the fact that I cannot use logging to log
> this message is really a bad thing, but I won't go into that here)..I
> essentially replaced the exit() calls with return() calls, which is what
> many of the other error cases were triggering.... I don't agree with using
> abort() or assert() as currently they are not used at all throughout the
> icecast code, and that will be a bad precedent to start. Clearly I wasn't
> trying to fix the problem, but rather just make the error handling logic
> more consistent, and leave it up to the calling functions to properly
> handle the return codes. There is no elegant way to handle this one, and I
> don't think my commit is any worse than it was before..
>
Well, it is very bad to just return here. Please revert this change if you're
not willing to change it to fail in some other way.
If any of these checks get triggered, the system is fatally broken - aborting
in one way or another is the _ONLY_ sensible thing to do. Internal state is
inconsistent at this point, and you can't rely on anything at all to work
correctly. Hence abort() is appropriate.
Mike
<p><p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list