diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-09-30 07:49:59 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-09-30 07:49:59 -0700 |
commit | 2c0b91d4ff5a168c5ad8dcb9d117d088e875b796 (patch) | |
tree | fbae83502ead72044dbb626e4e1db649ad0ea38c /test/core | |
parent | 3a12dcfd06bc504dfcf4d2faff3ced924a537384 (diff) |
Dont call malloc either
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/util/test_config.c | 10 |
1 files changed, 1 insertions, 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); |