From 2c0b91d4ff5a168c5ad8dcb9d117d088e875b796 Mon Sep 17 00:00:00 2001
From: Craig Tiller <craig.tiller@gmail.com>
Date: Wed, 30 Sep 2015 07:49:59 -0700
Subject: [PATCH] Dont call malloc either

---
 test/core/util/test_config.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c
index 348b9229bd..84b376ad3e 100644
--- a/test/core/util/test_config.c
+++ b/test/core/util/test_config.c
@@ -114,8 +114,6 @@ static void output_num(long num) {
 static void crash_handler(int signum, siginfo_t *info, void *data) {
   void *addrlist[MAX_FRAMES + 1];
   int addrlen;
-  int i;
-  char **symlist;
 
   output_string("\n\n\n*******************************\nCaught signal ");
   output_num(signum);
@@ -126,13 +124,7 @@ static void crash_handler(int signum, siginfo_t *info, void *data) {
   if (addrlen == 0) {
     output_string("  no backtrace\n");
   } else {
-    symlist = backtrace_symbols(addrlist, addrlen);
-    for (i = 0; i < addrlen; i++) {
-      output_string("  ");
-      output_string(symlist[i]);
-      output_string("\n");
-    }
-    free(symlist);
+    backtrace_symbols_fd(addrlist, addrlen, STDERR_FILENO);
   }
 
   raise(signum);
-- 
GitLab