Usage of pa_assert

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

 



2011/11/8 Tanu Kaskinen <tanuk at iki.fi>:
> On Tue, 2011-11-08 at 09:00 +0100, David Henningsson wrote:
>> In short, assertions are better than nothing, but proper error handling
>> is better than assertions.
>
> In my opinion assertions are proper error handling when the error in
> question is a programming error in our own code.

Indeed. There aren't many cases that just ignoring the failure and
carrying on like nothing happened adds much value over just hitting
the assert.

So do we have an official recommendation for distributors to leave
asserts enabled in production builds? I don't care much either way.
David seems to think it's the right thing to do.

I do think that fast-path asserts (pa_assert_fp) should be disabled,
except for developer builds. There's a reason these asserts can be
enabled or disabled independently from normal asserts and although the
current code doesn't use them much, there's already a patch of me (for
the trivial resampler) that makes very good use of a fast-path assert.

Maarten


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux