[asterisk-dev] [Code Review] [patch] reloading cel_pgsql.so in quick succession crashes asterisk

Russell Bryant reviewboard at asterisk.org
Tue Feb 1 13:13:26 CST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1090/#review3159
-----------------------------------------------------------

Ship it!


I'm not sure if it fixes the issue or not either, but it's a good change to make regardless.

- Russell


On 2011-01-31 10:47:50, Brett Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1090/
> -----------------------------------------------------------
> 
> (Updated 2011-01-31 10:47:50)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> A bug reported to digium stated that when cel_pgsql.so was reloaded in quick succession, asterisk would crash. Upon trying to replicate this bug in multiple ways, I was unable to but believe that the crash was due to a race condition in the module_unload code which caused certain memory to be free'd twice. The reason for this was because the pointers were checked in a conditional statement before being free'd, to make sure they weren't NULL, but weren't being set to NULL after they were being free'd. Therefore, if reload was called too quickly a race condition might result causing memory to be free'd twice.
> 
> 
> Diffs
> -----
> 
>   /tags/1.8.2-rc1/cel/cel_pgsql.c 305124 
> 
> Diff: https://reviewboard.asterisk.org/r/1090/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Brett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110201/9d90aa0a/attachment.htm>


More information about the asterisk-dev mailing list