[svn-commits] kmoore: branch 11 r371692 - in /branches/11: ./ main/utils.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Aug 27 09:07:15 CDT 2012
Author: kmoore
Date: Mon Aug 27 09:07:12 2012
New Revision: 371692
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371692
Log:
Implement workaround for BETTER_BACKTRACES crash
When compiling with BETTER_BACKTRACES enabled, Asterisk will sometimes
crash when "core show locks" is run. This happens regularly in the
testsuite since several tests run "core show locks" to help with
debugging. This seems to be a fault with libraries on certain operating
systems (notably CentOS 6.2/6.3) running on virtual machines and
utilizing gcc 4.4.6.
(closes issue ASTERISK-20090)
........
Merged revisions 371690 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 371691 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
branches/11/ (props changed)
branches/11/main/utils.c
Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: branches/11/main/utils.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/utils.c?view=diff&rev=371692&r1=371691&r2=371692
==============================================================================
--- branches/11/main/utils.c (original)
+++ branches/11/main/utils.c Mon Aug 27 09:07:12 2012
@@ -788,16 +788,20 @@
static void append_backtrace_information(struct ast_str **str, struct ast_bt *bt)
{
char **symbols;
+ int num_frames;
if (!bt) {
ast_str_append(str, 0, "\tNo backtrace to print\n");
return;
}
- if ((symbols = ast_bt_get_symbols(bt->addresses, bt->num_frames))) {
+ /* store frame count locally to avoid the memory corruption that
+ * sometimes happens on virtualized CentOS 6.x systems */
+ num_frames = bt->num_frames;
+ if ((symbols = ast_bt_get_symbols(bt->addresses, num_frames))) {
int frame_iterator;
- for (frame_iterator = 0; frame_iterator < bt->num_frames; ++frame_iterator) {
+ for (frame_iterator = 0; frame_iterator < num_frames; ++frame_iterator) {
ast_str_append(str, 0, "\t%s\n", symbols[frame_iterator]);
}
More information about the svn-commits
mailing list