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

rmudgett reviewboard at asterisk.org
Thu Aug 22 11:17:15 CDT 2013


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

(Updated Aug. 22, 2013, 4:17 p.m.)


Review request for Asterisk Developers.


Changes
-------

Incorporated wdoekes feedback.


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 (updated)
-----

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

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/20130822/4d3d0a8a/attachment.htm>


More information about the asterisk-dev mailing list