Telematic/Audiovisual Syst./Communication Syst. Engineering

Systems Architecture

September 2017 - January 2018

17.5.3.  Errors detected by Valgrind


Work Plan

We are going to work more in depth with the different types of error that Valgrind detects, and more specifically with the tool Memcheck.

  1. Read the error types detected by Memcheck, using the document shown above. Ignore the error Mismatched use of malloc/new/new [] vs free/delete/delete [], because only appears in programs written in C++.

  2. Read the error messages that can be obtained executing your program with Valgrind, using the second resource above.

  3. When finished the task above, write individually a summary (1 side of a sheet), displayed in a table, in such a way it includes the error type, a brief description (couple of lines) of why the error can appear, the possible messages Valgrind can print out, and a hypothetical code as an example. You can see an example in the following figure:

    Write the table in horizontal orientation, to see it better. Note that one type of error can have more than one associated message, as the one of the figure, but different types of errors can have associated the same error message (as the errors that imply an invalid write or read). If you don't know how to fill a row or column, leave it blank. You will be able to fill it while you work with Valgrind.