[asterisk-commits] kmoore: trunk r371535 - /trunk/main/utils.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 20 09:45:14 CDT 2012


Author: kmoore
Date: Mon Aug 20 09:45:07 2012
New Revision: 371535

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371535
Log:
Apply work-around 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.

(issue ASTERISK-20090)

Modified:
    trunk/main/utils.c

Modified: trunk/main/utils.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/utils.c?view=diff&rev=371535&r1=371534&r2=371535
==============================================================================
--- trunk/main/utils.c (original)
+++ trunk/main/utils.c Mon Aug 20 09:45:07 2012
@@ -788,16 +788,18 @@
 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))) {
+	num_symbols = 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 asterisk-commits mailing list