菜鸟笔记
提升您的技术认知

valgrind输出分析-ag真人游戏

1、test程序中会有打印信息,in papa 、in kid是test程序的打印信息。
2、两个等号中间的数字是valgrind执行时在系统中的进程号。

valgrind --tool=memcheck ./test 
==12592== memcheck, a memory error detector
==12592== ag真人试玩娱乐 copyright (c) 2002-2017, and gnu gpl'd, by julian seward et al.
==12592== using valgrind-3.16.1 and libvex; rerun with -h for ag真人试玩娱乐 copyright info
==12592== command: ./test
==12592== 
in kid
in papa
==12592== invalid write of size 4
==12592==    at 0x10922b: k (test.c:10)
==12592==    by 0x1092b7: main (test.c:24)
==12592==  address 0x4a494a4 is 4 bytes after a block of size 32 alloc'd
==12592==    at 0x483c7f3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==12592==    by 0x10921e: k (test.c:9)
==12592==    by 0x1092b7: main (test.c:24)
==12592== 
==12593== 
==12593== heap summary:
==12593==     in use at exit: 0 bytes in 0 blocks
==12593==   total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated
==12593== 
==12593== all heap blocks were freed -- no leaks are possible
==12593== 
==12593== for lists of detected and suppressed errors, rerun with: -s
==12593== error summary: 0 errors from 0 contexts (suppressed: 0 from 0)
网站地图