1/27
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Types of Errors
Preprocessing Stage Errors
Compilation Stage Errors
Assembly Stage Errors
Linking Stage Errors
Runtime Errors
Logical Errors
Preprocessing Stage Errors
Happens before actual compilation, while handling #include, #define, and macros
Common Preprocessing Stage Errors
Missing Header Files
Incorrect Macro Usage
Missing Header Files
Incorrect Macro Usage
Common Preprocessing Stage Errors
Missing Header Files
Incorrect Macro Usage
Compilation Stage Errors
___ checks grammar (syntax) and mean (semantics)
Also called “Syntax and Sematic Errors”
Syntax and Sematic Errors
Compilation Stage Errors
Common Compilation Stage Errors
Syntax Errors
Undeclared Variables
Type Mismatch
Syntax Errors
Undeclared Variables
Type Mismatch
Common Compilation Stage Errors
Syntax Errors
Undeclared Variables
Type Mismatch
Assembly Stage Errors
Rare, since this stage just translates complier output into machine code
Possible Issue: If the complier generates something the assembler cannot understand (unlikely modern compliers)
Linking Stage Errors
Happens when combining object files and libraries
Common Linking Stage Errors
Undefined References
Multiple Definitions
Missing Library
Undefined References
Multiple Definitions
Missing Library
Common Linking Stage Errors
Undefined References
Multiple Definitions
Missing Library
If you use math functions but forget to link the math library (in old compliers)
Runtime Errors
Program compiles and links successfully, but crashes or misbehaves while running
Common Runtime Errors
Divide by 0
Null Point Dereference
Memory Leak
Divide by 0
Null Point Dereference
Memory Leak
Common Runtime Errors
Divide by 0
Null Point Dereference
Memory Leak
Not freeing memory with delete/free
Logical Errors
The program runs, but produces the wrong output (hardest to detect)
Logical Error