[asterisk-dev] [Code Review] 2669: Fixed intermittent crash when loading test_json.so
Joshua Colp
reviewboard at asterisk.org
Thu Jul 11 09:54:46 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2669/#review9120
-----------------------------------------------------------
Ship it!
Ship It!
/trunk/tests/test_json.c
<https://reviewboard.asterisk.org/r/2669/#comment17995>
Out of the blue bug fix?
- Joshua Colp
On July 11, 2013, 1:33 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, 1:33 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 394049
>
> 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/c9645040/attachment.htm>
More information about the asterisk-dev
mailing list