Valgrind 출력을 어떻게 이해하면 되는 걸까요?
아래와 같이 valgrind를 사용해서 한 process의 memory 상태를 시험해봤는데요,
아래 Message의 내용을 어떻게 이해해야 할까 해서 질문을 올립니다.
"definately lost : 120 bytes in 1 blocks"라고 나오는 Message가 아래에 있는데
이 내용을 최종 결과로 이해하면 되는걸까요?
그렇다면 이 process (21733)은 120 byte의 memory leak이 있다고 생각하면 되는것인지요?
그리고 최종결과 이전에 아래와 같은 4가지 type의 message가 보이는데 이 것들은 어떻게
이해를 해야할까요?
모두가 memory leak을 가리키는 건 아닌 것 같은데요..
예를 들어서 아래 두번째 type에서 보여지는 것과 같은
uninitialsed value를 사용한 것 자체는 memory leak과는 관계가 없는 것이겠죠?
아래와 같은 4가지 type의 message를 어떻게 해석하는 게 좋은지 알려주시면 더더욱
감사드리겠습니다.
1) 첫번째 type
==21733== Conditional jump or move depends on uninitialised value(s)
==21733== at 0x4216D77: BN_bin2bn (in /lib/libcrypto.so.0.9.8b)
2) 두번째 type
==21733== Use of uninitialised value of size 4
==21733== at 0x4216143: BN_num_bits_word (in /lib/libcrypto.so.0.9.8b)
3) 세번째 type
==21733== Syscall param write(buf) points to uninitialised byte(s)
==21733== at 0x41A689E: __write_nocancel (in /lib/libpthread-2.6.so)
4) 네번째 type
==21733== Address 0x46fb117 is 15 bytes inside a block of size 18,698 alloc'd
==21733== at 0x4021A88: malloc (vg_replace_malloc.c:207)
==21733==
==21733== ERROR SUMMARY: 164662 errors from 267 contexts (suppressed: 186 from 4)
==21733== malloc/free: in use at exit: 34,553 bytes in 1,998 blocks.
==21733== malloc/free: 4,355 allocs, 2,357 frees, 2,447,107 bytes allocated.
==21733== For counts of detected errors, rerun with: -v
==21733== Use --track-origins=yes to see where uninitialised values come from
==21733== searching for pointers to 1,998 not-freed blocks.
==21733== checked 459,624 bytes.
==21733==
==21733== LEAK SUMMARY:
==21733== definitely lost: 120 bytes in 1 blocks.
==21733== possibly lost: 0 bytes in 0 blocks.
==21733== still reachable: 34,433 bytes in 1,997 blocks.
==21733== suppressed: 0 bytes in 0 blocks.
==21733== Rerun with --leak-check=full to see details of leaked memory.
==21787==
==21787== ERROR SUMMARY: 164662 errors from 267 contexts (suppressed: 186 from 4
감사합니다. ~
댓글 달기