mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-01 10:50:28 +08:00
Problem: valgrind shows unitialised errors in backtrace print
Solution: fix them
This commit is contained in:
parent
03c0b2dfe2
commit
dc51ebeb1f
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user