[asterisk-dev] [Code Review] 2778: Fix memory corruption when trying to get "core show locks".

rmudgett reviewboard at asterisk.org
Wed Aug 21 13:09:50 CDT 2013


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

Review request for Asterisk Developers.


Bugs: ASTERISK-22221
    https://issues.asterisk.org/jira/browse/ASTERISK-22221


Repository: Asterisk


Description
-------

Review https://reviewboard.asterisk.org/r/2580/ tried to fix the mismatch in memory pools but had a math error determining the buffer size and didn't address other similar memory pool mismatches.

* Effectively reverted the previous patch to go in the same direction as trunk for the returned memory pool of ast_bt_get_symbols().

* Fixed memory leak in ast_bt_get_symbols() when BETTER_BACKTRACES is defined.

* Fixed some formatting in ast_bt_get_symbols().

* Fixed sig_pri.c freeing memory allocated by libpri when MALLOC_DEBUG is enabled.

* Fixed __dump_backtrace() freeing memory from ast_bt_get_symbols() when MALLOC_DEBUG is enabled.

* Moved __dump_backtrace() because of compile issues with the utils directory.


Diffs
-----

  /branches/1.8/channels/sig_pri.c 397345 
  /branches/1.8/include/asterisk/astmm.h 397345 
  /branches/1.8/include/asterisk/lock.h 397345 
  /branches/1.8/include/asterisk/logger.h 397345 
  /branches/1.8/include/asterisk/utils.h 397345 
  /branches/1.8/main/astmm.c 397345 
  /branches/1.8/main/astobj2.c 397345 
  /branches/1.8/main/lock.c 397345 
  /branches/1.8/main/logger.c 397345 
  /branches/1.8/main/utils.c 397345 

Diff: https://reviewboard.asterisk.org/r/2778/diff/


Testing
-------

* Ran the testsuite masquerade test and it no longer fails/crashes.

* Did a manual local channel chain optimization with another console doing a "core show locks".  The other console did not cause a crash when the "core show locks" showed some lock backtraces.


Thanks,

rmudgett

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


More information about the asterisk-dev mailing list