Software Exceptions

From COMP15212 Wiki
Revision as of 09:03, 27 June 2019 by pc>Yuron
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
On path: Exceptions 1: Exceptions • 2: Reset • 3: System Calls • 4: Software Exceptions • 5: Emulator traps • 6: Memory Fault • 7: Interrupts • 8: Unix Signals
Depends on Exceptions

Some processor architectures can generate exceptions during otherwise legitimate instruction execution. ARM does not do this but Intel x86 processors do. Some examples are:

  • division by zero when using a DIV instruction
  • index out of bounds when using a BOUND (array bound check) instruction

The O.S. could halt the process as an error when these occur, or take some remedial action if the application has some appropriate handling mechanism.