summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2012-08-27 14:13:44 +0000
committerKinsey Moore <kmoore@digium.com>2012-08-27 14:13:44 +0000
commite13db61695d48c68adfbc45249ba1789a0c9ad9d (patch)
tree8ba701d59166a24ad84093f418f4fd19302d134d
parent1295d551f9eee39875216da64c093beced670de7 (diff)
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 ........ Merged revisions 371692 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--main/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/utils.c b/main/utils.c
index 3f21eb341..0ff33cba2 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -795,6 +795,8 @@ static void append_backtrace_information(struct ast_str **str, struct ast_bt *bt
return;
}
+ /* 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;