Your SlideShare is downloading. ×
0
Valgrind Alejandro García Castro
List of topics <ul><li>Review </li></ul><ul><li>Common parameters </li></ul><ul><li>Common errors checking memory </li></u...
Introduction <ul><li>Instrumentation framework to build analysis tools </li></ul><ul><li>It has tools that allows you to d...
Tools <ul><li>It includes tools for:  </li></ul><ul><ul><li>memory error detector (memcheck (default) </li></ul></ul><ul><...
Usual parameters <ul><li>num-callers </li></ul><ul><li>db-attach </li></ul><ul><li>trace-children </li></ul><ul><li>suppre...
Common errors <ul><li>Illegal read / Illegal write errors </li></ul><ul><li>Use of uninitialized values </li></ul><ul><li>...
Common errors (II) <ul><li>Overlapping source and destination blocks </li></ul><ul><li>Memory leak detection </li></ul>
Leak types <ul><li>Still reachable: A pointer to the start of the block is found </li></ul><ul><li>Possibly lost, or &quot...
References <ul><li>http://valgrind.org/ </li></ul>
Upcoming SlideShare
Loading in...5
×

Valgrind

1,761

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,761
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Valgrind"

  1. 1. Valgrind Alejandro García Castro
  2. 2. List of topics <ul><li>Review </li></ul><ul><li>Common parameters </li></ul><ul><li>Common errors checking memory </li></ul><ul><li>Leak types </li></ul>
  3. 3. Introduction <ul><li>Instrumentation framework to build analysis tools </li></ul><ul><li>It has tools that allows you to debug and profile programs </li></ul><ul><li>Very commonly used in a lot of projects and companies </li></ul><ul><li>CAUTION: Veeery slow!! </li></ul>
  4. 4. Tools <ul><li>It includes tools for: </li></ul><ul><ul><li>memory error detector (memcheck (default) </li></ul></ul><ul><ul><li>thread error detector (hellgrind) </li></ul></ul><ul><ul><li>cache and branch-prediction profiler (cachegrind) </li></ul></ul><ul><ul><li>call-graph generating cache profiler (callgrind) </li></ul></ul><ul><ul><li>heap profiler (massif) </li></ul></ul>
  5. 5. Usual parameters <ul><li>num-callers </li></ul><ul><li>db-attach </li></ul><ul><li>trace-children </li></ul><ul><li>suppressions </li></ul>
  6. 6. Common errors <ul><li>Illegal read / Illegal write errors </li></ul><ul><li>Use of uninitialized values </li></ul><ul><li>Illegal frees </li></ul><ul><li>When a block is freed with an inappropriate deallocation function </li></ul><ul><li>Passing system call parameters with inadequate read/write permissions </li></ul>
  7. 7. Common errors (II) <ul><li>Overlapping source and destination blocks </li></ul><ul><li>Memory leak detection </li></ul>
  8. 8. Leak types <ul><li>Still reachable: A pointer to the start of the block is found </li></ul><ul><li>Possibly lost, or &quot;dubious&quot;: A pointer to the interior of the block is found. </li></ul><ul><li>Definitely lost, or &quot;leaked&quot;: The worst outcome is that no pointer to the block can be found. </li></ul>
  9. 9. References <ul><li>http://valgrind.org/ </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×