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

David Lee reviewboard at asterisk.org
Thu Jul 11 09:57:29 CDT 2013



> On July 11, 2013, 9:54 a.m., Joshua Colp wrote:
> > /trunk/tests/test_json.c, line 293
> > <https://reviewboard.asterisk.org/r/2669/diff/1/?file=41311#file41311line293>
> >
> >     Out of the blue bug fix?

Actually, the opposite. I introduced that bug into a test to verify that the leak would fail the test. I merely forgot to take it out. Thanks!


- David


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


On July 11, 2013, 8:33 a.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2669/
> -----------------------------------------------------------
> 
> (Updated July 11, 2013, 8:33 a.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/06c1ab0b/attachment.htm>


More information about the asterisk-dev mailing list