[asterisk-dev] [Code Review] 3401: Sorcery: Give sorcery instances references to the underlying wizards.

Joshua Colp reviewboard at asterisk.org
Wed Mar 26 13:31:43 CDT 2014


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

Ship it!


Ship It!

- Joshua Colp


On March 26, 2014, 6:20 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3401/
> -----------------------------------------------------------
> 
> (Updated March 26, 2014, 6:20 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This small change is intended to address a crash seen in the testsuite, specifically with the PJSIP qualify test.
> 
> In that test, when Asterisk shuts down, sorcery kills its wizards container along with its sorcery instance container. After this occurs, a scheduled qualify is triggered, which attempts to use a freed wizard, therefore causing a crash. The reason for this is that sorcery instances have a bare pointer to a wizard (through an intermediary ast_sorcery_object_wizard struct). When the container of wizards is freed, the pointer on the sorcery instance is left dangling.
> 
> This patch addresses the problem by keeping wizards alive as long as a sorcery instance has a reference to the wizard.
> 
> 
> Diffs
> -----
> 
>   /branches/12/main/sorcery.c 411188 
> 
> Diff: https://reviewboard.asterisk.org/r/3401/diff/
> 
> 
> Testing
> -------
> 
> This change makes the PJSIP qualify test go from crashing 1 in 5 runs to running 120+ times with no crashes.
> 
> 
> Thanks,
> 
> Mark Michelson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140326/7bc92a8a/attachment.html>


More information about the asterisk-dev mailing list