[asterisk-dev] [Code Review] 3677: REF_DEBUG: record an entry to refs log when we run ao2_ref against an invalid (likely already freed) ao2 pointer

rmudgett reviewboard at asterisk.org
Thu Jun 26 09:48:04 CDT 2014


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

Ship it!


Ship It!

- rmudgett


On June 25, 2014, 10:21 p.m., Corey Farrell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3677/
> -----------------------------------------------------------
> 
> (Updated June 25, 2014, 10:21 p.m.)
> 
> 
> Review request for Asterisk Developers, Matt Jordan and rmudgett.
> 
> 
> Bugs: ASTERISK-23948
>     https://issues.asterisk.org/jira/browse/ASTERISK-23948
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> __ao2_ref_debug exits early when INTERNAL_OBJ returns NULL.  When user_data != NULL and delta != 0 we should always write to ref_log.  This change reorders __ao2_ref_debug to delay the return for obj == NULL.  Code that writes to ref_log is modified to be safe with obj == NULL.
> 
> This code is slightly different in 11 (funcname parameter is named func).  In 12+ a backtrace and assert were added to the existing obj == NULL block.  Patches for 11 and 12 can be viewed on JIRA.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/astobj2.c 417247 
> 
> Diff: https://reviewboard.asterisk.org/r/3677/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Corey Farrell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140626/734d91c5/attachment.html>


More information about the asterisk-dev mailing list