[asterisk-dev] [Code Review] 2669: Fixed intermittent crash when loading test_json.so

Joshua Colp reviewboard at asterisk.org
Thu Jul 11 10:22:31 CDT 2013


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


My previous ship it remains in style.

- Joshua Colp


On July 11, 2013, 3:18 p.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2669/
> -----------------------------------------------------------
> 
> (Updated July 11, 2013, 3:18 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-21978
>     https://issues.asterisk.org/jira/browse/ASTERISK-21978
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> The JSON test attempted an overly clever use of RAII_VAR to run code
> at the beginning and end of each test, in order to validate that no
> JSON objects were leaked during the test.
> 
> The problem is that the validation code would run during the initial
> load, when the tests were initialized. This happens during startup,
> when other parts of the system might actively be allocating and
> freeing JSON objects.
> 
> This patch changes the RAII_VAR to use the new
> ast_test_register_{init,cleanup} functions to run the validations
> properly.
> 
> 
> Diffs
> -----
> 
>   /trunk/tests/test_json.c 394078 
> 
> Diff: https://reviewboard.asterisk.org/r/2669/diff/
> 
> 
> Testing
> -------
> 
> Tests pass; used debug log to verify that _init and _cleanup ran on
> each test.
> 
> 
> Thanks,
> 
> David Lee
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130711/92b52cfd/attachment-0001.htm>


More information about the asterisk-dev mailing list