I'm running a multi-threading program and I get every time errors like
malloc(): memory corruption
or Segmentation fault.
I decided to use valgrind to investigate which kind of problems my program shows. First of all I got the below output. Can someone help me to understand how to read the output messages?
==17413== Conditional jump or move depends on uninitialised value(s)
==17413== at 0x47A2349: ns_name_ntop (ns_name.c:147)
==17413== by 0x47A3271: ns_name_uncompress (ns_name.c:585)
==17413== by 0x479B3EF: dn_expand (res_comp.c:93)
==17413== by 0x479FD2B: __res_queriesmatch (res_send.c:327)
==17413== by 0x47A0D19: __libc_res_nsend (res_send.c:1327)
==17413== by 0x479DDC7: __libc_res_nquery (res_query.c:226)
==17413== by 0x479E417: __libc_res_nquerydomain (res_query.c:582)
==17413== by 0x479E8FB: __libc_res_nsearch (res_query.c:416)
==17413== by 0x404B1D9: _nss_dns_gethostbyname3_r (dns-host.c:192)
==17413== by 0x404B540: _nss_dns_gethostbyname_r (dns-host.c:273)
==17413== by 0x42C53FA: gethostbyname_r@@GLIBC_2.1.2 (getXXbyYY_r.c:266)
==17413== by 0x42C4B7B: gethostbyname (getXXbyYY.c:116)
==17413== Uninitialised value was created by a stack allocation
==17413== at 0x804ADA3: UDP_Server_Open(int&, unsigned short) (UDP_Server.cpp:16)
==17413==
==17413== Use of uninitialised value of size 4
==17413== at 0x47A2382: ns_name_ntop (ns_name.c:153)
==17413== by 0x47A3271: ns_name_uncompress (ns_name.c:585)
==17413== by 0x479B3EF: dn_expand (res_comp.c:93)
==17413== by 0x479FD2B: __res_queriesmatch (res_send.c:327)
==17413== by 0x47A0D19: __libc_res_nsend (res_send.c:1327)
==17413== by 0x479DDC7: __libc_res_nquery (res_query.c:226)
==17413== by 0x479E417: __libc_res_nquerydomain (res_query.c:582)
==17413== by 0x479E8FB: __libc_res_nsearch (res_query.c:416)
==17413== by 0x404B1D9: _nss_dns_gethostbyname3_r (dns-host.c:192)
==17413== by 0x404B540: _nss_dns_gethostbyname_r (dns-host.c:273)
==17413== by 0x42C53FA: gethostbyname_r@@GLIBC_2.1.2 (getXXbyYY_r.c:266)
==17413== by 0x42C4B7B: gethostbyname (getXXbyYY.c:116)
==17413== Uninitialised value was created by a stack allocation
==17413== at 0x804ADA3: UDP_Server_Open(int&, unsigned short) (UDP_Server.cpp:16)