ISO/IEC TS 17961 C rules mapped to Klocwork checkers

Rule Checker name
5.01 Accessing an object through a pointer to an incompatible type [ptrcomp]

MISRA.CAST.OBJ_PTR_TO_OBJ_PTR.2012

5.02 Accessing freed memory [accfree]

UFM.DEREF.MIGHT

UFM.DEREF.MUST

UFM.FFM.MIGHT

UFM.FFM.MUST

UFM.RETURN.MIGHT

UFM.RETURN.MUST

UFM.USE.MIGHT

UFM.USE.MUST

5.04 No assignment in conditional expressions [boolasgn]

ASSIGCOND.CALL

ASSIGCOND.GEN

5.06 Calling functions with incorrect arguments [argcomp]

MISRA.CAST.FUNC_PTR.2012

MISRA.FUNC.NOPROT.CALL

5.07 Calling signal from interruptible signal handlers [sigcall]

MISRA.STDLIB.SIGNAL

MISRA.INCL.SIGNAL.2012

5.08 Calling system [syscall]

MISRA.STDLIB.ABORT.2012_AMD1

5.09 Comparison of padding data [padcomp]

MISRA.STDLIB.MEMCMP.PTR_ARG_TYPES

5.10 Converting a pointer to integer or integer to pointer [intptrconv]

MISRA.CAST.OBJ_PTR_TO_INT.2012

5.11 Converting pointer values to more strictly aligned pointer types [alignconv]

MISRA.CAST.OBJ_PTR_TO_OBJ_PTR.2012

5.12 Copying a FILE object [filecpy]

MISRA.FILE_PTR.DEREF.2012

MISRA.FILE_PTR.DEREF.CAST.2012

MISRA.FILE_PTR.DEREF.INDIRECT.2012

MISRA.FILE_PTR.DEREF.RETURN.2012

5.13 Declaring the same function or object in incompatible ways [funcdecl]

MISRA.FUNC.NO_PARAMS

MISRA.FUNC.UNMATCHED.PARAMS

MISRA.FUNC.UNNAMED.PARAMS

MISRA.FUNC.PROT_FORM.KR.2012

MISRA.FUNC.NOPROT.DEF.2012

5.14 Dereferencing an out-of-domain pointer [nullref]

NPD.CHECK.CALL.MIGHT

NPD.CHECK.CALL.MUST

NPD.CHECK.MIGHT

NPD.CHECK.MUST

NPD.CONST.CALL

NPD.CONST.DEREF

NPD.FUNC.CALL.MIGHT

NPD.FUNC.CALL.MUST

NPD.FUNC.MIGHT

NPD.FUNC.MUST

NPD.GEN.CALL.MIGHT

NPD.GEN.CALL.MUST

NPD.GEN.MIGHT

NPD.GEN.MUST

RNPD.CALL

RNPD.DEREF

SV.TAINTED.DEREF

SV.TAINTED.CALL.DEREF

5.15 Escaping of the address of an automatic object [addrescape]

LOCRET.ARG

LOCRET.GLOB

LOCRET.RET

5.17 Use of an implied default in a switch statement [swtchdflt]

MISRA.SWITCH.WELL_FORMED.DEFAULT.2012

5.18 Failing to close files or free dynamic memory when they are no longer needed [fileclose]

FREE.INCONSISTENT

MLK.MIGHT

MLK.MUST

MLK.RET.MIGHT

MLK.RET.MUST

RH.LEAK

5.19 Failing to detect and handle standard library errors [liberr]

MISRA.FUNC.UNUSEDRET.2012

5.21 Allocating insufficient memory [insufmem]

INCORRECT.ALLOC_SIZE

5.22 Forming or using out-of-bounds pointers or array subscripts [invptr]

ABV.GENERAL

ABV.GENERAL.MULTIDIMENSION

ABV.ITERATOR

ABV.MEMBER

ABV.STACK

CXX.SUSPICIOUS_INDEX_CHECK

CXX.SUSPICIOUS_INDEX_CHECK.CALL

CXX.SUSPICIOUS_INDEX_CHECK.ZERO

RABV.CHECK

MISRA.PTR.ARITH.NOT_SAME.2012

5.23 Freeing memory multiple times [dblfree]

UFM.FFM.MIGHT

UFM.FFM.MUST

5.24 Including tainted or out-of-domain input in a format string [usrfmt]

SV.TAINTED.FMTSTR

5.26 Integer division errors [diverr]

DBZ.CONST

DBZ.CONST.CALL

DBZ.GENERAL

DBZ.ITERATOR

DBZ.ITERATOR.CALL

SV.TAINTED.BINOP

SV.TAINTED.CALL.BINOP

5.28 Modifying string literals [strmod]

MISRA.STRING_LITERAL.NON_CONST.2012

CXX.OVERWRITE_CONST_CHAR

5.29 Modifying the string returned by getenv, localeconv, setlocale, and strerror [libmod]

MISRA.STDLIB.ILLEGAL_WRITE.2012_AMD1

5.30 Overflowing signed integers [intoflow]

NUM.OVERFLOW

NUM.OVERFLOW.DF

SV.TAINTED.BINOP

SV.TAINTED.CALL.BINOP

5.31 Passing a non-null-terminated character sequence to a library function that expects a string [nonnullcs]

NNTS.MIGHT

NNTS.MUST

NNTS.TAINTED

5.32 Passing arguments to character-handling functions that are not representable as unsigned char [chrsgnext]

MISRA.STDLIB.CTYPE.RANGE.2012_AMD1

5.34 Reallocating or freeing memory that was not dynamically allocated [xfree]

FNH.MIGHT

FNH.MUST

FUM.GEN.MIGHT

FUM.GEN.MUST

5.35 Referencing uninitialized memory [uninitref]

UNINIT.HEAP.MIGHT

UNINIT.HEAP.MUST

UNINIT.STACK.ARRAY.MIGHT

UNINIT.STACK.ARRAY.MUST

UNINIT.STACK.ARRAY.PARTIAL.MUST

UNINIT.STACK.MIGHT

UNINIT.STACK.MUST

5.37 Tainted strings are passed to a string copying function [taintstrcpy]

NNTS.TAINTED

5.38 Taking the size of a pointer to determine the size of the pointed-to type [sizeofptr]

MISRA.EXPR.SIZEOF.ARRAY_PARAM.2012_AMD1

5.39 Using a tainted value as an argument to an unprototyped function pointer [taintnoproto]

MISRA.FUNC.NO_PARAMS

MISRA.FUNC.UNMATCHED.PARAMS

MISRA.FUNC.UNNAMED.PARAMS

MISRA.FUNC.PROT_FORM.KR.2012

5.40 Using a tainted value to write to an object using a formatted input or output function [taintformatio]

MISRA.DEFINE.STDIO.WCHAR.2012

MISRA.STDLIB.STDIO

MISRA.STDLIB.STDIO.WCHAR.2012

MISRA.INCL.STDIO.2012

5.42 Using an object overwritten by getenv, localeconv, setlocale, and strerror [libuse]

MISRA.STDLIB.ILLEGAL_REUSE.2012_AMD1

5.44 Using identifiers that are reserved for the implementation [resident]

MISRA.DEFINE.WRONGNAME

MISRA.DEFINE.WRONGNAME.UNDERSCORE

MISRA.UNDEF.WRONGNAME

MISRA.UNDEF.WRONGNAME.UNDERSCORE

MISRA.STDLIB.WRONGNAME

MISRA.STDLIB.WRONGNAME.UNDERSCORE

5.45 Using invalid format strings [invfmtstr]

SV.FMT_STR.PRINT_FORMAT_MISMATCH.BAD

SV.FMT_STR.PRINT_FORMAT_MISMATCH.UNDESIRED

SV.FMT_STR.PRINT_IMPROP_LENGTH

SV.FMT_STR.PRINT_PARAMS_WRONGNUM.FEW

SV.FMT_STR.PRINT_PARAMS_WRONGNUM.MANY

SV.FMT_STR.SCAN_FORMAT_MISMATCH.BAD

SV.FMT_STR.SCAN_FORMAT_MISMATCH.UNDESIRED

SV.FMT_STR.SCAN_IMPROP_LENGTH

SV.FMT_STR.SCAN_PARAMS_WRONGNUM.FEW

SV.FMT_STR.SCAN_PARAMS_WRONGNUM.MANY

SV.FMT_STR.UNKWN_FORMAT

5.46 Tainted, potentially mutilated, or out-of-domain integer values are used in a restricted sink [taintsink]

SV.TAINTED.INDEX_ACCESS

SV.TAINTED.CALL.INDEX_ACCESS

ISO/IEC TS 17961 Coverage Overview

Total rules 46
Supported by Klocwork (including partial) 36
Partial rules supported 5.01, 5.04, 5.06, 5.10, 5.21, 5.28, 5.37, 5.30, 5.44, 5.46

"MISRA", "MISRA C" and "MISRA C++" are registered trademarks of The MISRA Consortium Limited. ​