[asterisk-dev] [Code Review] Don't run the atexit functions more than once
Tilghman Lesher
reviewboard at asterisk.org
Sat Jan 7 16:04:03 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1658/#review5126
-----------------------------------------------------------
Ship it!
Looks good from my end.
- Tilghman
On Jan. 7, 2012, 3:42 p.m., Terry Wilson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1658/
> -----------------------------------------------------------
>
> (Updated Jan. 7, 2012, 3:42 p.m.)
>
>
> Review request for Asterisk Developers, wdoekes and Matt Jordan.
>
>
> Summary
> -------
>
> Asterisk can get multiple calls to the quit_handler from different threads. This can result in the atexit functions running multiple times. In one case, this causes multiple calls to the xmlCleanupParser() function which causes a double free and crash. I initially tried to handle things in quit_handler, but only succeeded in making some consoles never exit. :-)
>
>
> This addresses bug ASTERISK-18883.
> https://issues.asterisk.org/jira/browse/ASTERISK-18883
>
>
> Diffs
> -----
>
> /branches/1.8/main/asterisk.c 349967
>
> Diff: https://reviewboard.asterisk.org/r/1658/diff
>
>
> Testing
> -------
>
> Threw tons of asterisk -rx "core stop gracefully" calls in a loop at a bunch of 'asterisk -vvvgc' instances that were also starting in loops until it crashed. After the patch, it stopped crashing.
>
>
> Thanks,
>
> Terry
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120107/86670360/attachment.htm>
More information about the asterisk-dev
mailing list