Paolo Bonzini <pbonz...@redhat.com> writes:

>>>> I sympathize with the general idea, but I don't like dead code
>>> after abort().  What about cleaning that up?
>>>
>> Good idea, but it should be a separate patch. This patch is "safe",
>> whereas the cleanup patch could cause problems if it's not done
>> carefully.
>
> This patch is "safe", however I'd consider not changing
> assert(0)->abort() if there is code after the assert that looks like
> an attempt at recovering.  Example:
>
>    if (!p) {
>        printf ("the impossible has happened!");
>        assert (0);
>    }
>
>    return p->q;
>
> should be changed to abort, while
>
>    if (!p) {
>        printf ("the impossible has happened!");
>        assert (0);
>        return 0;
>    }
>
>    return p->q;
>
> should not.

Except when you find that the recovery attempt is insufficient, of
course.  Requires closer inspection.


Reply via email to