MSL2009. Valgrind

773 views
713 views

Published on

Presentation about Valgrind done at Master on Free Software 2009 Edition

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

  • Be the first to like this

No Downloads
Views
Total views
773
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

MSL2009. Valgrind

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

×