Error Detection Flashcards
1
Q
What is a seg fault?
A
An error that occurs when performing an undefined operation on memory. Usually, accesing non-existent memory or already allocated memory.
2
Q
What are the most common forms of seg fault?
A
- Modifying string literal
- accessing freed address
- Index out of bounds
- Stack Overflow
- Dereferenceing an uninitialized pointer.
3
Q
What are two tools used to assist with identifying seg faults?
A
- Valgrind
- GBD
4
Q
What is Valgrind?
A
An open source Unix memory analysis tool
5
Q
What does Valgrind do?
A
Identifies memory leaks and seg faults
6
Q
What is GBD?
A
Gnu project Debugger. (only works on linux machines)
7
Q
What does GBD do?
A
It takes compiled code and gives debugging messaging. More helpful than Valgrind.