Summary: | ASTERISK-21978: Crash caused by RAII_VAR in test_json when loading module | ||
Reporter: | Matt Jordan (mjordan) | Labels: | |
Date Opened: | 2013-06-28 14:43:10 | Date Closed: | 2013-07-12 13:26:03 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Tests/General |
Versions: | 12 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) ASTERISK-21978-backtrace.txt | |
Description: | When Asterisk loads a test module, it actually calls each test module with the TEST_INIT flag to set the info struct's properties (summary, description, etc.) Tests have to be careful to not call any test execution logic when this occurs.
The test_json tests are using RAII_VAR to stub out and track memory allocation leaks. Because they are being called as a result of RAII_VAR, they are called when TEST_INIT is passed to the test function. This can apparently cause a crash. The unit test framework now has the ability to have pre/post-test executions called before/after test execution, which will handle not calling such methods when TEST_INIT is used. | ||
Comments: |