Appendix: Runtime Messages

This appendix lists the error messages produced by the Watcom C/C++ runtime library. These messages can only appear during the execution of an application built with one of the C runtime libraries.

This appendix includes the following sections:

Runtime error messages

Assertion failed: %s, file %s, line %d
This message is displayed whenever an assertion that you have made in your program isn't true.
Stack Overflow!
Your program is trying to use more stack space than is available. If you believe that your program is correct, you can increase the size of the stack by using the option stack=nnnn when you link the program. The stack size can also be specified with the N option if you're using the cc command.
Floating-point support not loaded
You've called one of the printf functions with a format of %e, %f, or %g, but haven't passed a floating-point value.

The compiler generates a reference to the variable _fltused_ whenever you pass a floating-point value to a function. During the linking phase, the extra floating-point formatting routines will also be brought into your application when _fltused_ is referenced. Otherwise, you only get the non floating-point formatting routines.

*** NULL assignment detected
This message is displayed if any of the first 32 bytes of your program's data segment have been modified. The check is performed just before your program exits to the operating system. All this message means is that sometime during the execution of your program, this memory was modified.

To find the problem, you must link your application with debugging information and use the Watcom Debugger to monitor its execution:

  1. First, run the application with Watcom Debugger until it completes.
  2. Examine the first 16 bytes of the data segment (examine __nullarea) and press Space to see the next 16 bytes. Any values that aren't equal to '01' have been modified.
  3. Reload the application, set watch points on the modified locations, and start execution. The Watcom Debugger will stop when the specified location(s) change in value.

errno values and their meanings

The following errors can be generated by the C runtime library. These error codes correspond to the error types defined in errno.h.

EOK (0)
No error
EPERM (1)
Operation not permitted
ENOENT (2)
No such file or directory

The specified file or directory can't be found.

ESRCH (3)
No such process
EINTR (4)
Interrupted function call
EIO (5)
I/O error
ENXIO (6)
No such device or address
E2BIG (7)
Arg list too big

The argument list passed to the spawn...(), exec...() or system() function exceeds the limit imposed by QNX, or the environment information exceeds 64K.

ENOEXEC (8)
Exec format error

The executable file has an invalid format.

EBADF (9)
Bad file descriptor

The file descriptor isn't a valid file descriptor value, or it doesn't correspond to an open file.

ECHILD (10)
No child processes
EAGAIN (11)
Resource unavailable; try again
ENOMEM (12)
Not enough memory

There wasn't enough memory available to perform the specified request.

EACCES (13)
Permission denied

You don't have the required (or correct) permissions to access a file.

EFAULT (14)
Bad address
ENOTBLK (15)
Block device required
EBUSY (16)
Resource busy
EEXIST (17)
File exists

An attempt was made to create a file with the O_EXCL (exclusive) flag when the file already exists.

EXDEV (18)
Improper link

An attempt was made to rename a file to a different device.

ENODEV (19)
No such device
ENOTDIR (20)
Not a directory
EISDIR (21)
Is a directory
EINVAL (22)
Invalid argument

An invalid value was specified for one of the arguments to a function.

ENFILE (23)
Too many files in the system

All the FILE structures are in use, so no more files can be opened.

EMFILE (24)
Too many open files

There are no more file descriptors available, so no more files can be opened.

ENOTTY (25)
Inappropriate I/O control operation
ETXTBSY (26)
Text file busy
EFBIG (27)
File too large
ENOSPC (28)
No space left on device

No more space is left for writing on the device, which usually means that the disk is full.

ESPIPE (29)
Invalid seek
EROFS (30)
Read-only file system
EMLINK (31)
Too many links
EPIPE (32)
Broken pipe
EDOM (33)
Math arg out of domain of func

An argument to a math function isn't in the domain of the function.

ERANGE (34)
Result too large

The result of a math function couldn't be represented (too small, or too large).

ENOMSG (35)
No message of desired type
EIDRM (36)
Identifier removed
ECHRNG (37)
Channel number out of range
EL2NSYNC (38)
Level 2 not synchronized
EL3HLT (39)
Level 3 halted
EL3RST (40)
Level 3 reset
ELNRNG (41)
Link number out of range
EUNATCH (42)
Protocol driver not attached
ENOCSI (43)
No CSI structure available
EL2HLT (44)
Level 2 halted
EDEADLK (45)
Resource deadlock avoided

A resource deadlock would occur with regards to locked files.

ENOLCK (46)
No locks available
ELOOP (62)
Too many levels of symbolic links or prefixes
ENAMETOOLONG (78)
Filename too long

Shared library errors

ELIBACC (83)
Can't access shared library
ELIBBAD (84)
Accessing a corrupted shared library
ELIBSCN (85)
.lib section in a.out corrupted
ELIBMAX (86)
Attempting to link in too many libraries
ELIBEXEC (87)
Attempting to exec a shared library
ENOSYS (89)
Function not implemented
ENOTEMPTY (93)
Directory not empty
EOPNOTSUPP (103)
Operation not supported
ESTALE (122)
Potentially recoverable i/o error

Non-blocking and interrupt I/O

EWOULDBLOCK (11)
Operation would block
EINPROGRESS (236)
Operation now in progress
EALREADY (16)
Operation already in progress

IPC/Network software - argument errors

ENOTSOCK (238)
Socket operation on non-socket
EDESTADDRREQ (239)
Destination address required
EMSGSIZE (240)
Message too long
EPROTOTYPE (241)
Protocol wrong type for socket
ENOPROTOOPT (242)
Protocol not available
EPROTONOSUPPORT (243)
Protocol not supported
ESOCKTNOSUPPORT (244)
Socket type not supported
EPFNOSUPPORT (246)
Protocol family not supported
EAFNOSUPPORT (247)
Address family not supported by protocol family
EADDRINUSE (248)
Address already in use
EADDRNOTAVAIL (249)
Can't assign requested address

IPC/Network software - operational errors

ENETDOWN (250)
Network is down
ENETUNREACH (251)
Network is unreachable
ENETRESET (252)
Network dropped connection on reset
ECONNABORTED (253)
Software caused connection abort
ECONNRESET (254)
Connection reset by peer
ENOBUFS (255)
No buffer space available
EISCONN (256)
Socket is already connected
ENOTCONN (257)
Socket is not connected
ESHUTDOWN (258)
Can't send after socket shutdown
ETOOMANYREFS (259)
Too many references: can't splice
ETIMEDOUT (260)
Connection timed out
ECONNREFUSED (261)
Connection refused
EHOSTDOWN (264)
Host is down
EHOSTUNREACH (265)
No route to host

QNX-specific

ENOREMOTE (1000)
Must be done on local machine
ENONDP (1001)
Need an NDP (8087...) to run
EBADFSYS (1002)
Corrupted file system detected
ENO32BIT (1003)
32-bit integer fields were used
ENOVPE (1004)
No proc entry available for virtual process
ENONETQ (1005)
Process manager-to-net enqueuing failed
ENONETMAN (1006)
Could not find net manager for node number
EVIDBUF2SML (1007)
Told to allocate a vid buf too small
EVIDBUF2BIG (1008)
Told to allocate a vid buf too big
EMORE (1009)
More to do; send message again
ECTRLTERM (1010)
Remap to controlling terminal
ENOLIC (1011)
No license

Math runtime error messages

The following errors can be generated by the math functions in the C runtime library. These error codes correspond to the exception types defined in math.h, and returned by the matherr() function when a math error occurs.

DOMAIN
Domain error

An argument to the function is outside the domain of the function.

OVERFLOW
Overflow range error

The function result is too large.

PLOSS
Partial loss of significance

A partial loss of significance occurred.

SING
Argument singularity

An argument to the function has a bad value (for example, log(0.0)).

TLOSS
Total loss of significance

A total loss of significance occurred. An argument to a function was too large to produce a meaningful result.

UNDERFLOW
Underflow range error

The result is too small to be represented.