C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

21 Run-Time Messages
This chapter presents the error messages that can occur during the execution of C and C++
programs. The Common Run-Time Environment (CRE) emits these messages. For more details on
the error messages and the CRE, see the Common Run-Time Environment (CRE) Programmer’s
Guide.
Trap and Signal Messages
The TNS CRE reports the messages in this subsection if a trap occurs and your program has neither
disabled traps nor enabled its own trap handler. The native CRE reports the messages in this
subsection if a signal is raised and your program does not have its own signal handler for the
signal that was raised. The CRE or run-time library terminates your program.
The CRE treats trap 4, arithmetic fault, as a program logic error, not a trap. If your program has
disabled overflow traps, the TNS CRE returns control to your run-time library. The native CRE raises
a SIGFPE signal instead. For additional detail, see the language-specific manuals for the routines
in your program for additional detail. The Guardian Programmer’s Guide describes traps and
signals.
1
Unknown trap
Cause
The CRE trap processing function was called with an unknown trap number.
2
Illegal address reference
Cause
An address was specified that was not within either the virtual code area or the virtual data area
allocated to the process.
3
Instruction failure
Cause
An attempt was made to:
Execute a code word that is not an instruction.
Execute a privileged instruction by a non privileged process.
Reference an illegal extended address.
4
Arithmetic fault
Cause
In the TNS environment, the overflow bit in the environment-register, ENV.<10>, was set to 1.
In the native environment, a SIGFPE was raised. In either environment, the fault occurs for one
of these reasons:
The result of a signed arithmetic operation could not be represented with the number of bits
available for the particular data type.
A division operation was attempted with a zero divisor.
Trap and Signal Messages 363