#Enforcer Hits
5 messages in this thread
What exactly are "Enforcer Hits"? People keep referring to them…
Paul
Enforcer is a debugging tool which runs in the background which detects illegal
memory accesses. A common type of illegal memory access involves location zero.
This can occur from trying to use a NULL pointer and will cause a 'hit' at
which point Enforcer provides a dump of information which can be used to locate
the problem. There are even a few utilities which can digest this information
to point to a line of source code which generates the problem. You may also be
able to single step a program in a debugger and find the line in which the hit
occurs. Programs which generate enforcer hits may cause immediate (or deferred)
system crashes when run without enforcer.
"Enforcer" is a tool which uses an MMU (Memory Management Unit) to watch
for illegal accesses to memory. When such an access occurs, Enforcer
dumps some information to the serial port (by default). This is known as
a "hit." The illegal accesses are always caused by a bug in some program.
Sometimes they happen in such a way that on some machines, some times the
program could continue without noticable problem. That's why Enforcer was
written in the first place — so programmers could immediately see that
they'd done something wrong, rather than having to wait for their machine
to crash (or to find a machine their program did crash on…).
An "Enforcer Hit" then, is just a specific type of bug in a program.