[code]#include
我用 valgrind --tool=memcheck --leak-check=yes --show-reachable=yes ./server 运行程序 输出 ==26420== Memcheck, a memory error detector. ==26420== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==26420== Using LibVEX rev 1606, a library for dynamic binary translation. ==26420== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==26420== Using valgrind-3.2.0, a dynamic binar...
错误提示如下, ==26995== Conditional jump or move depends on uninitialised value(s) ==26995== at 0x426E965: mempcpy (in /lib/tls/libc-2.3.6.so) ==26995== by 0x4261950: _IO_file_xsputn (in /lib/tls/libc-2.3.6.so) ==26995== by 0x423DFEE: vfprintf (in /lib/tls/libc-2.3.6.so) ==26995== by 0x42463C1: fprintf (in /lib/tls/libc-2.3.6.so) ==26995== by 0x8048D4F: main (online_time.c:71) ==2...
我的系统是红帽企业 Linux ES 4, 用whereis命令发现系统已内置了valgrind, 但版本是v3.2.0, 现在想升级到v3.2.3 (已经下载了 valgrind-3.2.3.tar.bz2 包), 怎么做? 直接安装就可以么?
用valgrind检查内存泄漏, 如下: 2,448 bytes in 17 blocks are possibly lost in loss record 34 of 37 ==12744== at 0x4023492: calloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==12744== by 0x4010D38: (within /lib/ld-2.8.so) ==12744== by 0x4010DFB: _dl_allocate_tls (in /lib/ld-2.8.so) ==12744== by 0x40409D9: pthread_create@@GLIBC_2.1 (in /lib/libpthread-2.8.so) ==12744== by 0...