[asterisk-dev] [Code Review] automagically set a pointer to null after it is freed with ast_free

Benny Amorsen benny+usenet at amorsen.dk
Tue Sep 20 08:04:30 CDT 2011


Simon Perreault <simon.perreault at viagenie.ca> writes:

> Benny Amorsen wrote, on 09/16/2011 09:37 AM:
>> Combine the advantages: Set the pointer to something which is not NULL
>> but guaranteed to crash. 1 might work?
>
> This would interfere badly with the good tools we already have (Valgrind,
> debugging malloc/free libs, etc.)

The same disadvantage applies to using NULL, and Asterisk is far from
Valgrind-clean, which makes Valgrind difficult to use already.

Are any of you using Valgrind on Asterisk? I did a serious attempt at it
back in 1.6.x, but there was little interest in the community.


/Benny



More information about the asterisk-dev mailing list