[FRIAM] div. zero bugs?
Marcus G. Daniels
mgd at santafe.edu
Tue Oct 24 03:01:23 EDT 2006
phil henshaw wrote:
> Are there self-protecting sentinel circuits or routines to catch them
> in the act and shut them down?
A couple examples come to mind:
1) floating point hardware knows when calculations have gone bad due to
underflow, overflow, divide by zero, etc. The operating system kernel
can notice these and signal them as exceptions, if the user prefers.
The sanity checks are in hardware as are the task switching / recovery
mechanisms for inspecting them.
2) The memory management unit of computer knows about the mapping from
physical addresses to virtual ones and knows the difference between
valid and invalid memory addresses. Addresses can be handed out and
reclaimed such that bad addresses due to programming mistakes cause
hardware traps (e.g. the Electric fence malloc library). A crude form
of this is for Unix users is the segfault or a bus error signals.
More information about the Friam
mailing list