[pulseaudio-discuss] [PATCH 2/6] Turn device ports into reference counted objects
david.henningsson at canonical.com
Tue Nov 8 00:54:01 PST 2011
On 11/08/2011 09:31 AM, Maarten Bosmans wrote:
> 2011/11/8 David Henningsson<david.henningsson at canonical.com>:
>> On 11/03/2011 07:33 PM, Tanu Kaskinen wrote:
>>> This looks good too. I'd really like the pa_device_port_hashmap_free()
>>> function behavior change to match all other *_free() functions, though.
>> I do acknowledge the consistency argument, but I think we're over-using
>> asserts in this project in general. From a development perspective, it might
>> be useful, but from maintaining PA downstream, I'm tired of PA crashing
>> every time something happens that the developer did not anticipate.
>> Especially in destructors like this one, we should could try to free what we
>> can instead of crashing.
> That's exactly why you should compile without asserts enable for
> production builds.
I'm afraid that approach won't work for Ubuntu - there are way too many
cases where we *don't* do proper error handling, and where the assert is
the difference between being able to actually find the bug (proper stack
trace is collected by Ubuntu's bug reporting system "apport") and
horribly failing with a sigsegv somewhere later on with minimal
possibilities to understand what happened.
So yeah, disabling asserts would make us win in some cases but fail
horribly in others.
What do other distributions do here?
David Henningsson, Canonical Ltd.
More information about the pulseaudio-discuss