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

svnbot reviewboard at asterisk.org
Fri Jul 12 13:23:44 CDT 2013


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

(Updated July 12, 2013, 1:23 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 394203


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/20130712/2eaca21e/attachment.htm>


More information about the asterisk-dev mailing list