Commit dc51ebeb authored by Luca Boccassi's avatar Luca Boccassi

Problem: valgrind shows unitialised errors in backtrace print

Solution: fix them
parent 03c0b2df
......@@ -415,6 +415,10 @@ void zmq::print_backtrace (void)
if (unw_get_proc_info (&cursor, &p_info))
break;
rc = unw_get_proc_name (&cursor, func_name, 256, &offset);
if (rc == -UNW_ENOINFO)
strcpy(func_name, "?");
addr = (void *)(p_info.start_ip + offset);
if (dladdr (addr, &dl_info) && dl_info.dli_fname)
......@@ -422,10 +426,6 @@ void zmq::print_backtrace (void)
else
file_name = "?";
rc = unw_get_proc_name (&cursor, func_name, 256, &offset);
if (rc == -UNW_ENOINFO)
strcpy(func_name, "?");
demangled_name = abi::__cxa_demangle (func_name, NULL, NULL, &rc);
printf ("#%u %p in %s (%s+0x%lx)\n", frame_n++, addr, file_name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment