[asterisk-dev] [Code Review] 3752: astobj2: Fix race condition in ref_debug log
Matt Jordan
reviewboard at asterisk.org
Sat Jul 12 15:48:40 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3752/#review12594
-----------------------------------------------------------
Closing out in favour of Corey's patch on https://reviewboard.asterisk.org/r/3756/
- Matt Jordan
On July 11, 2014, 9:45 p.m., Matt Jordan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3752/
> -----------------------------------------------------------
>
> (Updated July 11, 2014, 9:45 p.m.)
>
>
> Review request for Asterisk Developers and Corey Farrell.
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> As Corey noticed, when an object's reference is changed rapidly the ref debug log will report the wrong reference. This is due to accessing the reference (which is not thread safe) prior to the reference count being changed. Since the change in reference count is returned by internal_ao2_ref, it can be used instead to determine what the current state of the object is.
>
>
> Diffs
> -----
>
> /team/group/media_formats-reviewed-trunk/main/astobj2.c 418435
>
> Diff: https://reviewboard.asterisk.org/r/3752/diff/
>
>
> Testing
> -------
>
> Objects that were incorrectly reported as leaked no longer are.
>
>
> Thanks,
>
> Matt Jordan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140712/c4aeec81/attachment.html>
More information about the asterisk-dev
mailing list