Valgrind 출력을 어떻게 이해하면 되는 걸까요?

hyper9의 이미지

아래와 같이 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

감사합니다. ~

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.