
Problem
You are given the source to an application which crashes when it is run.
After running it ten times in a debugger, you find it never crashes in
the same place. The application is single threaded, and uses only the C
standard library. What programming errors could be causing this crash?
How would you test each one?
Solution
The question largely depends on the type of application being diagnosed.
However, we can give some general causes of random crashes.
General cases
Not initialising a variable but attempting to use its value.
Dereferencing...