Memory Access Errors

A dynamically allocated piece of memory can be accessed in several illegal ways.

  1. Read before write: This is a read of uninitialized data and can lead to random results. Repeated runs of the program cause different results depending on which memory chunk is allocated.

  2. Write before or after allocation: This happens when a process writes beyond borders, e.g. makes mistakes in array arithmetics. Or the memory has been given back to the system (via free) and the process still writes to it.