[asterisk-dev] [Code Review] 3401: Sorcery: Give sorcery instances references to the underlying wizards.
Mark Michelson
reviewboard at asterisk.org
Thu Mar 27 09:20:23 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3401/
-----------------------------------------------------------
(Updated March 27, 2014, 9:20 a.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers.
Changes
-------
Committed in revision 411295
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/20140327/46c23aa3/attachment.html>
More information about the asterisk-dev
mailing list