обзор сигналов (overview of signals)
Ошибки (баги) (Bugs)
There are six signals that can be delivered as a consequence of a
hardware exception: SIGBUS
, SIGEMT
, SIGFPE
, SIGILL
, SIGSEGV
, and
SIGTRAP
. Which of these signals is delivered, for any given
hardware exception, is not documented and does not always make
sense.
For example, an invalid memory access that causes delivery of
SIGSEGV
on one CPU architecture may cause delivery of SIGBUS
on
another architecture, or vice versa.
For another example, using the x86 int instruction with a
forbidden argument (any number other than 3 or 128) causes
delivery of SIGSEGV
, even though SIGILL
would make more sense,
because of how the CPU reports the forbidden operation to the
kernel.