This page provides an overview of each error code. You can suppress errors using the Suppressions Control Panel (see Customizing Options on Windows). The following sections provide a detailed description of each error including:

  • A brief explanation of what problem has been detected.
  • An example program that generates a similar error.
  • Output that would be generated by running the example, with annotations indicating what the various pieces of the diagnostic mean and how they should be interpreted in identifying your own problems. The exact appearance of the error message may depend on how Insure++ is currently configured.
  • A brief description of ways in which the problem might be eliminated.

Sometimes you will see values identified as <argument #> or <return> instead of names from your program. In this case, <argument n> refers to the nth argument passed to the current function (i.e., the argument where the error was detected), and <return> refers to a value returned from the function indicated.


ALLOC_CONFLICT

CodeDescriptionEnabledReportedPlatform
ALLOC_CONFLICTMixing malloc/free with new/ delete(tick)RuntimeWindows/Unix
(badfree)

Memory was allocated with new or new[] and an attempt was made to free it with free.

(tick)RuntimeWindows/Unix
(baddelet)

Memory was allocated with malloc and an attempt was made to free it with delete or delete[].

(tick)RuntimeWindows/Unix
(badhandle)

Memory is allocated by one heap and freed by a different heap

(tick)RuntimeWindows


BAD_CAST

CodeDescriptionEnabledReportedPlatform
BAD_CASTCast of pointer loses precision(tick)CompilationWindows/Unix


BAD_DECL

CodeDescriptionEnabledReportedPlatform
BAD_DECLIncompatible global declarations(tick)RuntimeWindows/Unix


BAD_FORMAT

CodeDescriptionEnabledReportedPlatform
BAD_DECLIncompatible global declarations(error)

Compilation

Runtime

Windows/Unix
(sign)Types differ only by sign, e.g., int vs. unsigned int(error)CompilationWindows/Unix
(compatible)Fundamental types are different but they happen to have the same representation on the particular hardware in use, e.g., int vs. long on machines where both are 32-bits, or int * vs. long where both are 32-bits.(error)CompilationWindows/Unix
(incompatible)Fundamental types are different, e.g., int vs. double(tick)RuntimeWindows/Unix
(other)A problem other than an argument type mismatch is detected, such as passing the wrong number of arguments. Error messages are classified according to this scheme and can be selectively enabled or disabled(tick)CompilationWindows/Unix


BAD_PARM

CodeDescriptionEnabledReportedPlatform
BAD_PARMMismatch in argument type.(error)

Compilation

Windows/Unix
(sign)Types differ only by sign, e.g., int vs. unsigned int(error)CompilationWindows/Unix
(compatible)

Fundamental types are different but they happen to have the same representation on the particular hardware in use, e.g., int vs. long on machines where both are 32-bits.

(error)CompilationWindows/Unix
(incompatible)Fundamental types are different, e.g., int vs. double(tick)CompilationWindows/Unix
(pointer)

This is not an error class, but a keyword used to suppress messages about mismatched pointer types, such as int * vs. char *.

(tick)CompilationWindows/Unix
(union)

Forces a declared union argument to match only a similar union as an actual argument. If this is suppressed, you may pass any of the individual union elements to the routine, rather than the union type, or pass a union to a routine which expects one of the union-elements as an argument.

(tick)CompilationWindows/Unix
(other)A problem other than an argument type mismatch is detected, such as passing the wrong number of arguments. Error messages are classified according to this scheme and can be selectively enabled or disabled(tick)CompilationWindows/Unix


BOGUS_LEAK

CodeDescriptionEnabledReportedPlatform
BOGUS_LEAKRuntime leak not found during execution(tick)RuntimeWindows/Unix


COPY_BAD_RANGE

CodeDescriptionEnabledReportedPlatform
COPY_BAD_RANGE

Attempt to copy out-of-range pointer

(error)RuntimeWindows/Unix


COPY_DANGLING

CodeDescriptionEnabledReportedPlatform
COPY_DANGLING

Attempt to copy dangling pointer

(error)RuntimeWindows/Unix


COPY_UNINIT_PTR

CodeDescriptionEnabledReportedPlatform
COPY_UNINIT_PTR

Attempt to copy uninitialized pointer

(error)RuntimeWindows/Unix


COPY_WILD

CodeDescriptionEnabledReportedPlatform
COPY_UNINIT_PTR

Attempt to copy a wild pointer

(error)RuntimeWindows/Unix


DEAD_CODE

CodeDescriptionEnabledReportedPlatform
DEAD_CODE

Code is not evaluated, has no effect, or is unreachable

(error)

Compilation

Windows/Unix
(emptyloopbody)Loop body is empty.(error)CompilationWindows/Unix
(emptystmt)The statement is empty.(error)CompilationWindows/Unix
(noeffect)Code has no effect.(error)CompilationWindows/Unix
(notevaluated)Code is not evaluated.(error)CompilationWindows/Unix


DELETE_MISMATCH

CodeDescriptionEnabledReportedPlatform
DELETE_MISMATCH

Mismatch between new/new[] and delete/delete[]

(error)RuntimeWindows/Unix
(bracket)

new, delete[]

(tick)RuntimeWindows/Unix
(nobracket)

new[], delete

(tick)RuntimeWindows/Unix


EXPR_BAD_RANGE

CodeDescriptionEnabledReportedPlatform
EXPR_BAD_RANGE

Expression exceeded range

(error)RuntimeWindows/Unix


EXPR_DANGLING

CodeDescriptionEnabledReportedPlatform
EXPR_DANGLING

Expression uses a dangling pointer

(error)RuntimeWindows/Unix


EXPR_NULL

CodeDescriptionEnabledReportedPlatform
EXPR_NULL

Expression uses NULL pointer

(tick)RuntimeWindows/Unix


EXPR_UNINIT_PTR

CodeDescriptionEnabledReportedPlatform
EXPR_UNINIT_PTR

Expression uses uninitialized pointer

(tick)RuntimeWindows/Unix


EXPR_UNRELATED_ PTRCMP

CodeDescriptionEnabledReportedPlatform
EXPR_UNRELATED_ PTRCMP

Expression compares unrelated pointers

(tick)RuntimeWindows/Unix


EXPR_UNRELATED_ PTRDIFF

CodeDescriptionEnabledReportedPlatform
EXPR_UNRELATED_ PTRDIFF

Expression subtracts unrelated pointers

(tick)RuntimeWindows/Unix


EXPR_WILD

CodeDescriptionEnabledReportedPlatform
EXPR_WILD

Expression uses a wild pointer

(error)RuntimeWindows/Unix


FREE_BODY

CodeDescriptionEnabledReportedPlatform
FREE_BODY

Freeing memory block from body

(tick)RuntimeWindows/Unix


FREE_DANGLING

CodeDescriptionEnabledReportedPlatform
FREE_DANGLING

Freeing dangling pointer

(tick)RuntimeWindows/Unix


FREE_GLOBAL

CodeDescriptionEnabledReportedPlatform
FREE_GLOBAL

Freeing global memory

(tick)RuntimeWindows/Unix


FREE_LOCAL

CodeDescriptionEnabledReportedPlatform
FREE_LOCAL

Freeing local memory

(tick)RuntimeWindows/Unix


FREE_NULL

CodeDescriptionEnabledReportedPlatform
FREE_LOCAL

Freeing null pointer

(tick)RuntimeWindows/Unix


FREE_UNINIT_PTR

CodeDescriptionEnabledReportedPlatform
FREE_UNINIT_PTR

Freeing uninitialized pointer

(tick)RuntimeWindows/Unix


FREE_WILD

CodeDescriptionEnabledReportedPlatform
FREE_WILD

Freeing wild pointer

(tick)RuntimeWindows/Unix


FUNC_BAD

CodeDescriptionEnabledReportedPlatform
FUNC_BAD

Function pointer is not a function

(tick)RuntimeWindows/Unix


FUNC_NULL

CodeDescriptionEnabledReportedPlatform
FUNC_NULL

Function pointer is NULL

(tick)RuntimeWindows/Unix


FUNC_UNINIT_PTR

CodeDescriptionEnabledReportedPlatform
FUNC_UNINIT_PTR

Function pointer is uninitialized

(tick)RuntimeWindows/Unix


HEAP_CORRUPT

CodeDescriptionEnabledReportedPlatform
HEAP_CORRUPT

Dynamic memory heap is corrupt

(tick)RuntimeWindows/Unix


INSURE_ERROR

CodeDescriptionEnabledReportedPlatform
INSURE_ERROR

Various internal errors

(tick)Runtime, CompilationWindows/Unix


INSURE_WARNING

CodeDescriptionEnabledReportedPlatform
INSURE_WARNING

Errors from iic_warning calls

(error)CompilationWindows/Unix


LEAK_ASSIGN

CodeDescriptionEnabledReportedPlatform
LEAK_ASSIGN

Memory leaked as a result of pointer reassignment

(tick)RuntimeWindows/Unix


LEAK_FREE

CodeDescriptionEnabledReportedPlatform
LEAK_ASSIGN

Memory leaked freeing block

(tick)RuntimeWindows/Unix


LEAK_RETURN

CodeDescriptionEnabledReportedPlatform
LEAK_RETURN

Memory leaked by ignoring returned value

(tick)RuntimeWindows/Unix


LEAK_SCOPE

CodeDescriptionEnabledReportedPlatform
LEAK_RETURN

Memory leaked leaving scope

(tick)RuntimeWindows/Unix


PARM_BAD_RANGE

CodeDescriptionEnabledReportedPlatform
PARM_BAD_RANGE

Array parameter exceeded range

(tick)RuntimeWindows/Unix


PARM_DANGLING

CodeDescriptionEnabledReportedPlatform
PARM_DANGLING

Array parameter is a dangling pointer

(tick)RuntimeWindows/Unix


PARM_NULL

CodeDescriptionEnabledReportedPlatform
PARM_NULL

Array parameter is NULL

(tick)RuntimeWindows/Unix


PARM_UNINIT_PTR

CodeDescriptionEnabledReportedPlatform
PARM_UNINIT_PTR

Array parameter is an uninitialized pointer

(tick)RuntimeWindows/Unix


PARM_WILD

CodeDescriptionEnabledReportedPlatform
PARM_WILD

Array parameter is wild

(tick)RuntimeWindows/Unix


PARSE_ERROR

CodeDescriptionEnabledReportedPlatform
PARSE_ERROR

Unidentified error

(tick)CompilationWindows/Unix


PARSE_WARNING

CodeDescriptionEnabledReportedPlatform
PARSE_WARNING

Variable declared but never used

(error)CompilationWindows/Unix


PCH_ERROR

CodeDescriptionEnabledReportedPlatform
PCH_ERROR

Unsupported PCH configuration

(tick)CompilationWindows

READ_BAD_INDEX

CodeDescriptionEnabledReportedPlatform
READ_BAD_INDEX

Reading array out of range

(tick)RuntimeWindows/Unix


READ_DANGLING

CodeDescriptionEnabledReportedPlatform
READ_DANGLING

Reading from a dangling pointer

(tick)RuntimeWindows/Unix


READ_NULL

CodeDescriptionEnabledReportedPlatform
READ_NULL

Reading NULL pointer

(tick)RuntimeWindows/Unix


READ_OVERFLOW

CodeDescriptionEnabledReportedPlatform
READ_OVERFLOW
(error)RuntimeWindows/Unix
(normal)Reading overflow's memory(tick)RuntimeWindows/Unix
(nonull)

String is not NULL-terminated within range

(tick)RuntimeWindows/Unix
(string)

Alleged string does not begin within legal range

(tick)RuntimeWindows/Unix
(struct)

Structure reference out of range

(tick)RuntimeWindows/Unix


READ_UNINIT_MEM

CodeDescriptionEnabledReportedPlatform
READ_UNINIT_MEMReading uninitialized memory(error)RuntimeWindows/Unix
(copy)

Copy from uninitialized region

(error)RuntimeWindows/Unix
(read)

Use of uninitialized value

(tick)RuntimeWindows/Unix


READ_UNINIT_PTR

CodeDescriptionEnabledReportedPlatform
READ_UNINIT_PTRReading from uninitialized pointer(tick)RuntimeWindows/Unix


READ_WILD

CodeDescriptionEnabledReportedPlatform
READ_WILDReading wild pointer(tick)RuntimeWindows/Unix


RETURN_DANGLING

CodeDescriptionEnabledReportedPlatform
RETURN_DANGLINGReturning pointer to local variable(tick)CompilationWindows/Unix


RETURN_FAILURE

CodeDescriptionEnabledReportedPlatform
RETURN_FAILUREFunction call returned an error(error)RuntimeWindows/Unix


RETURN_INCONSISTENT

CodeDescriptionEnabledReportedPlatform
RETURN_INCONSISTENTFunction has inconsistent return type(error)CompilationWindows/Unix
(level 1)No declaration, returns nothing(error)CompilationWindows/Unix
(level 2)Declared int, returns nothing(tick)CompilationWindows/Unix
(level 3)Declared non-int, returns nothing(tick)CompilationWindows/Unix
(level 4)Returns different types at different statements(tick)CompilationWindows/Unix


STL_ERROR

Insure++ can detect several STL usage errors on Unix systems:

UNUSED_VAR

CodeDescriptionEnabledReportedPlatform
UNUSED_VARUnused variables(error)CompilationWindows/Unix
(assigned)Variable is assigned but never used(error)CompilationWindows/Unix
(unassigned)Variable is never used(error)CompilationWindows/Unix


USER_ERROR

CodeDescriptionEnabledReportedPlatform
USER_ERRORUser-generated error message(tick)RuntimeWindows/Unix


WRITE_BAD_INDEX

CodeDescriptionEnabledReportedPlatform
WRITE_BAD_INDEXWriting array out of range(tick)RuntimeWindows/Unix


WRITE_DANGLING

CodeDescriptionEnabledReportedPlatform
WRITE_DANGLINGWriting to a dangling pointer(tick)RuntimeWindows/Unix


WRITE_NULL

CodeDescriptionEnabledReportedPlatform
WRITE_NULLWriting to a NULL pointer(tick)RuntimeWindows/Unix


WRITE_OVERFLOW

CodeDescriptionEnabledReportedPlatform
WRITE_OVERFLOW
(error)RuntimeWindows/Unix
(normal)Writing overflows memory(tick)RuntimeWindows/Unix
(struct)Structure references out of range(tick)RuntimeWindows/Unix


WRITE_UNINIT_PTR

CodeDescriptionEnabledReportedPlatform
WRITE_UNINIT_PTRWriting to an uninitialized pointer(tick)RuntimeWindows/Unix


WRITE_WILD

CodeDescriptionEnabledReportedPlatform
WRITE_WILDWriting to a wild pointer(tick)RuntimeWindows/Unix




  • No labels