HKMC C++ Secure Coding Standard for Automotive Development

Rule Checker name and description
HKMC P-CON-001 (Middle): Do not destroy a mutex while it is locked

CERT.CONC.MUTEX.DESTROY_WHILE_LOCKED  Do not destroy a mutex while it is locked

HKMC P-CON-001 (中): ロックされている間にミューテックスを破棄しないでください

CERT.CONC.MUTEX.DESTROY_WHILE_LOCKED  Do not destroy a mutex while it is locked

HKMC P-CON-004 (Low): Prevent deadlock by locking mutex in predefined order

CONC.DL  Deadlock

HKMC P-CON-004 (低): 事前定義された順序でミューテックスをロックすることでデッドロックを回避します

CONC.DL  Deadlock

HKMC P-CON-005 (Low): Wrap function that can wake up falsely in a loop

CERT.CONC.WAKE_IN_LOOP  Wrap functions that can spuriously wake up in a loop

HKMC P-CON-005 (低): ループ内で偽って起動する可能性のあるラップ関数

CERT.CONC.WAKE_IN_LOOP  Wrap functions that can spuriously wake up in a loop

HKMC P-CON-006 (Low): Protect thread safety and liveness when using condition variables

CERT.CONC.UNSAFE_COND_VAR  Preserve thread safety and liveness when using condition variables

HKMC P-CON-006 (低): 条件変数を使用するときにスレッドセーフと活性を保護します

CERT.CONC.UNSAFE_COND_VAR  Preserve thread safety and liveness when using condition variables

HKMC P-CTR-001 (High): Guarantee that container indices and iterators are within the valid range

ABV.ANY_SIZE_ARRAY  Buffer Overflow - Array Index Out of Bounds

ABV.GENERAL  Buffer Overflow - Array Index Out of Bounds

ABV.GENERAL.MULTIDIMENSION  Buffer Overflow - Array Index Out of Bounds

ABV.NON_ARRAY  Non-array object is used as an array

ABV.STACK  Buffer Overflow - Local Array Index Out of Bounds

ABV.TAINTED  Buffer Overflow from Unvalidated Input

SV.TAINTED.ALLOC_SIZE  Use of Unvalidated Integer in Memory Allocation

SV.TAINTED.CALL.INDEX_ACCESS  Use of Unvalidated Integer as Array Index by Function Call

SV.TAINTED.CALL.LOOP_BOUND  Use of Unvalidated Integer in Loop Condition through a Function Call

SV.TAINTED.INDEX_ACCESS  Use of Unvalidated Integer as Array Index

HKMC P-CTR-001 (高): コンテナーインデックスと反復子が有効な範囲内にあることを保証します

ABV.ANY_SIZE_ARRAY  Buffer Overflow - Array Index Out of Bounds

ABV.GENERAL  Buffer Overflow - Array Index Out of Bounds

ABV.GENERAL.MULTIDIMENSION  Buffer Overflow - Array Index Out of Bounds

ABV.NON_ARRAY  Non-array object is used as an array

ABV.STACK  Buffer Overflow - Local Array Index Out of Bounds

ABV.TAINTED  Buffer Overflow from Unvalidated Input

SV.TAINTED.ALLOC_SIZE  Use of Unvalidated Integer in Memory Allocation

SV.TAINTED.CALL.INDEX_ACCESS  Use of Unvalidated Integer as Array Index by Function Call

SV.TAINTED.CALL.LOOP_BOUND  Use of Unvalidated Integer in Loop Condition through a Function Call

SV.TAINTED.INDEX_ACCESS  Use of Unvalidated Integer as Array Index

HKMC P-CTR-002 (High): Do not use valid references

ITER.CONTAINER.MODIFIED  Use of invalid iterator

HKMC P-CTR-002 (高): コンテナーの要素を参照するために、有効な参照、ポインター、および反復子を使用しないでください

ITER.CONTAINER.MODIFIED  Use of invalid iterator

HKMC P-CTR-003 (High): Overflow protection required when copying data

ITER.END.OUTPARAM.MIGHT  Use of 'end' as an output iterator

ITER.END.OUTPARAM.MUST  Use of 'end' as an output iterator

HKMC P-CTR-003 (高): データをコピーする場合はオーバーフロー保護が必要

ITER.END.OUTPARAM.MIGHT  Use of 'end' as an output iterator

ITER.END.OUTPARAM.MUST  Use of 'end' as an output iterator

HKMC P-CTR-004 (High): Use valid iterator ranges

CXX.ITER.END.BEGIN  Iterator representing end of the range precedes start of range

ITER.INAPPROPRIATE  Use of iterator with inappropriate container object

ITER.INAPPROPRIATE.MULTIPLE  Use of iterator with inappropriate container object

HKMC P-CTR-004 (高): 有効な反復子範囲を使用します

CXX.ITER.END.BEGIN  Iterator representing end of the range precedes start of range

ITER.INAPPROPRIATE  Use of iterator with inappropriate container object

ITER.INAPPROPRIATE.MULTIPLE  Use of iterator with inappropriate container object

HKMC P-CTR-006 (High): Do not use an additive operator on an iterator if the result would overflow

ITER.ADVANCE.NONADJACENT  Advancing iterator by a distance of more than 1

HKMC P-CTR-006 (高): 結果がオーバーフローする場合は、反復子で加法演算子を使用しない

ITER.ADVANCE.NONADJACENT  Advancing iterator by a distance of more than 1

HKMC P-DCL-001 (High): Do not define a C-style variadic function

MISRA.FUNC.VARARG  Function with variable number of arguments

HKMC P-DCL-001 (高): C スタイルの variadic 関数を定義しないでください

MISRA.FUNC.VARARG  Function with variable number of arguments

HKMC P-DCL-002 (Low): Do not declare or define a reserved identifier

MISRA.DEFINE.WRONGNAME  Usage of a name from the standard library for naming a macro

MISRA.DEFINE.WRONGNAME.UNDERSCORE  Usage of a reserved name for naming a macro

MISRA.STDLIB.WRONGNAME  Reused name of standard library macro, object or function

MISRA.STDLIB.WRONGNAME.UNDERSCORE  Usage of a reserved name for naming a language entity

MISRA.UNDEF.WRONGNAME  Undefinition of a name from the standard library

MISRA.UNDEF.WRONGNAME.UNDERSCORE  Undefinition of a reserved name

HKMC P-DCL-002 (低): 予約済みの識別子を宣言または定義しないでください

MISRA.DEFINE.WRONGNAME  Usage of a name from the standard library for naming a macro

MISRA.DEFINE.WRONGNAME.UNDERSCORE  Usage of a reserved name for naming a macro

MISRA.STDLIB.WRONGNAME  Reused name of standard library macro, object or function

MISRA.STDLIB.WRONGNAME.UNDERSCORE  Usage of a reserved name for naming a language entity

MISRA.UNDEF.WRONGNAME  Undefinition of a name from the standard library

MISRA.UNDEF.WRONGNAME.UNDERSCORE  Undefinition of a reserved name

HKMC P-DCL-003 (Low): Do not qualify a reference type with const or volatile

CERT.DCL.REF_TYPE.CONST_OR_VOLATILE  Never qualify a reference type with const or volatile

HKMC P-DCL-003 (低): 参照型を const または volatile で修飾しないでください

CERT.DCL.REF_TYPE.CONST_OR_VOLATILE  Never qualify a reference type with const or volatile

HKMC P-DCL-004 (Low): Do not write syntactically ambiguous declarations

CERT.DCL.AMBIGUOUS_DECL  Do not write syntactically ambiguous declarations

HKMC P-DCL-004 (低): 構文的に曖昧な宣言を作成しないでください

CERT.DCL.AMBIGUOUS_DECL  Do not write syntactically ambiguous declarations

HKMC P-DCL-005 (Low): Overload allocation and deallocation functions as a pair in the same scope

CERT.DCL.SAME_SCOPE_ALLOC_DEALLOC  Overload allocation and deallocation functions as a pair in the same scope

HKMC P-DCL-005 (低): 同一のスコープ内のペアとして割り当ておよび割り当て解除の関数をオーバーロードします

CERT.DCL.SAME_SCOPE_ALLOC_DEALLOC  Overload allocation and deallocation functions as a pair in the same scope

HKMC P-DCL-006 (Low): Attention of data leaks when passing class objects across trust boundaries

PORTING.STORAGE.STRUCT  Byte position of elements in a structure could depend on alignment and packing attributes.

HKMC P-DCL-006 (低): 信頼境界を越えてクラスオブジェクトを渡すときのデータ漏洩に関する注意

PORTING.STORAGE.STRUCT  Byte position of elements in a structure could depend on alignment and packing attributes.

HKMC P-DCL-007 (Low): Do not reenter of function during initalization of static objects

CXX.STATIC.OBJ.RECURSION  Do not reenter function during initialization of static objects

HKMC P-DCL-007 (低): 静的オブジェクトの初期化中に関数を再入力しないでください

CXX.STATIC.OBJ.RECURSION  Do not reenter function during initialization of static objects

HKMC P-DCL-008 (Low): Prevent termination due to exceptions in destructors or deallocation functions

MISRA.DTOR.THROW  Throw in destructor

HKMC P-DCL-008 (低): デストラクターまたは割り当て解除関数での例外による終了を防ぎます

MISRA.DTOR.THROW  Throw in destructor

HKMC P-DCL-009 (High): Do not modify the standard namespaces

CERT.DCL.STD_NS_MODIFIED  Do not modify the standard namespaces

HKMC P-DCL-009 (高): 標準の名前空間を変更しないでください

CERT.DCL.STD_NS_MODIFIED  Do not modify the standard namespaces

HKMC P-DCL-010 (Middle): Do not define an unnamed namespace in a header file

MISRA.NAMESPACE.UNMD  Unnamed namespace in header file

HKMC P-DCL-010 (中): 名前が付いていない名前空間をヘッダーファイルで定義しないでください

MISRA.NAMESPACE.UNMD  Unnamed namespace in header file

HKMC P-DCL-011 (High): Compliance of ODR (One-Definition Rule)

AUTOSAR.ADD.ONEDEFRULE.FUNC  Function is violating one definition rule

AUTOSAR.ADD.ONEDEFRULE.VAR  Variable is violating one definition rule

MISRA.CT.UNIQUE.ID  Identifier clashes with tag name

MISRA.TYPE.NAMECLASH.CPP.2008  Identifier in one name space has same spelling as identifier in other name space

MISRA.TYPEDEF.NOT_UNIQUE  Typedef name is used for another entity

HKMC P-DCL-011 (高): ODR (一定義規則: One-Definition Rule) の遵守

AUTOSAR.ADD.ONEDEFRULE.FUNC  Function is violating one definition rule

AUTOSAR.ADD.ONEDEFRULE.VAR  Variable is violating one definition rule

MISRA.CT.UNIQUE.ID  Identifier clashes with tag name

MISRA.TYPE.NAMECLASH.CPP.2008  Identifier in one name space has same spelling as identifier in other name space

MISRA.TYPEDEF.NOT_UNIQUE  Typedef name is used for another entity

HKMC P-ERR-001 (Low): Do not abruptly terminate the program

CERT.ERR.ABRUPT_TERM  Do not abruptly terminate the program

HKMC P-ERR-001 (低): プログラムを突然終了しないでください

CERT.ERR.ABRUPT_TERM  Do not abruptly terminate the program

HKMC P-ERR-003 (Low): Do not use setjmp() or longjum()

MISRA.STDLIB.LONGJMP  Use of setjmp macro or longjmp function

HKMC P-ERR-003 (低): setjmp() または longjum() を使用しないでください

MISRA.STDLIB.LONGJMP  Use of setjmp macro or longjmp function

HKMC P-ERR-004 (Low): Do not reference base classes or class data members in a constructor or destructor function-try-block handler

MISRA.CTOR.TRY.NON_STATIC  Function try/catch block of constructor or destructor references non-static members

HKMC P-ERR-004 (低): コンストラクターまたはデストラクターの function-try-block ハンドラーでは、基本クラスまたはクラスデータメンバーを参照しないでください

MISRA.CTOR.TRY.NON_STATIC  Function try/catch block of constructor or destructor references non-static members

HKMC P-ERR-005 (Middle): Exception handling in order from lowest class to highest class

MISRA.CATCH.NOALL  Ellipsis exception handler is not the last one in a try-catch block

MISRA.CATCH.WRONGORD  Handler for a base exception class precedes to a handler for a derived exception class in a try-catch block

HKMC P-ERR-005 (中): 最低クラスから最高クラスの順での例外処理

MISRA.CATCH.NOALL  Ellipsis exception handler is not the last one in a try-catch block

MISRA.CATCH.WRONGORD  Handler for a base exception class precedes to a handler for a derived exception class in a try-catch block

HKMC P-ERR-008 (Low): Prevent to leak resources when handling exceptions

CL.MLK  Memory Leak - in destructor

MLK.MIGHT  Memory Leak - possible

MLK.MUST  Memory Leak

MLK.RET.MIGHT  Memory Leak - possible

MLK.RET.MUST  Memory Leak

RH.LEAK  Resource leak

HKMC P-ERR-008 (低): 例外を処理するときにリソースのリークを防ぎます

CL.MLK  Memory Leak - in destructor

MLK.MIGHT  Memory Leak - possible

MLK.MUST  Memory Leak

MLK.RET.MIGHT  Memory Leak - possible

MLK.RET.MUST  Memory Leak

RH.LEAK  Resource leak

HKMC P-ERR-010 (Low): Catch exceptions by lvalue reference

MISRA.CATCH.BY_VALUE  Exception object of class type is caught by value

HKMC P-ERR-010 (低): lvalue 参照によって例外をキャッチします

MISRA.CATCH.BY_VALUE  Exception object of class type is caught by value

HKMC P-ERR-011 (Middle): Detect errors when converting a string to a number

CERT.ERR.CONV.STR_TO_NUM  Detect errors when converting a string to a number

HKMC P-ERR-011 (中): 文字列を数値に変換するときにエラーを検出します

CERT.ERR.CONV.STR_TO_NUM  Detect errors when converting a string to a number

HKMC P-EXP-001 (Middle): Attention to the order of evaluation that causes the side effects

CERT.EXPR.PARENS  The precedence of operators within expressions should be made explicit.

MISRA.EXPR.PARENS.INSUFFICIENT  Limited dependence required for operator precedence rules in expressions

MISRA.INCR_DECR.OTHER  Increment or decrement operator is mixed with other operators in expression

MISRA.INCR_DECR.SIDEEFF.2012  A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator

PORTING.VAR.EFFECTS  Variable used twice in one expression where one usage is subject to side-effects

HKMC P-EXP-001 (中): 副作用を引き起こす評価の順番に関する注意

CERT.EXPR.PARENS  The precedence of operators within expressions should be made explicit.

MISRA.EXPR.PARENS.INSUFFICIENT  Limited dependence required for operator precedence rules in expressions

MISRA.INCR_DECR.OTHER  Increment or decrement operator is mixed with other operators in expression

MISRA.INCR_DECR.SIDEEFF.2012  A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator

PORTING.VAR.EFFECTS  Variable used twice in one expression where one usage is subject to side-effects

HKMC P-EXP-002 (Low): Do not delete an array through a pointer of the incorrect type

CERT.EXPR.DELETE_ARR.BASE_PTR  Do not delete an array through a pointer of the incorrect type

HKMC P-EXP-002 (低): 不正確な型のポインターを介して配列を削除しないでください

CERT.EXPR.DELETE_ARR.BASE_PTR  Do not delete an array through a pointer of the incorrect type

HKMC P-EXP-003 (Low): Attention to use expressions that do not evaluate(calculate) operands

MISRA.SIZEOF.SIDE_EFFECT  Operand of sizeof has side effects

HKMC P-EXP-003 (低): オペランドを評価 (計算) しない式の使用に関する注意

MISRA.SIZEOF.SIDE_EFFECT  Operand of sizeof has side effects

HKMC P-EXP-004 (High): Do not reference memory before initialized

UNINIT.CTOR.MIGHT  Uninitialized Variable in Constructor - possible

UNINIT.CTOR.MUST  Uninitialized Variable in Constructor

UNINIT.HEAP.MIGHT  Uninitialized Heap Use - possible

UNINIT.HEAP.MUST  Uninitialized Heap Use

UNINIT.STACK.ARRAY.MIGHT  Uninitialized Array - possible

UNINIT.STACK.ARRAY.MUST  Uninitialized Array

UNINIT.STACK.ARRAY.PARTIAL.MUST  Partially Uninitialized Array

UNINIT.STACK.MIGHT  Uninitialized Variable - possible

UNINIT.STACK.MUST  Uninitialized Variable

HKMC P-EXP-004 (高): 初期化される前にメモリを参照しないでください

UNINIT.CTOR.MIGHT  Uninitialized Variable in Constructor - possible

UNINIT.CTOR.MUST  Uninitialized Variable in Constructor

UNINIT.HEAP.MIGHT  Uninitialized Heap Use - possible

UNINIT.HEAP.MUST  Uninitialized Heap Use

UNINIT.STACK.ARRAY.MIGHT  Uninitialized Array - possible

UNINIT.STACK.ARRAY.MUST  Uninitialized Array

UNINIT.STACK.ARRAY.PARTIAL.MUST  Partially Uninitialized Array

UNINIT.STACK.MIGHT  Uninitialized Variable - possible

UNINIT.STACK.MUST  Uninitialized Variable

HKMC P-EXP-005 (High): Do not access an object of its lifetime

CL.FFM.ASSIGN  Use of free memory (double free) - no operator=

CL.FFM.COPY  Use of free memory (double free) - no copy constructor

LOCRET.ARG  Function returns address of local variable

LOCRET.GLOB  Function returns address of local variable

LOCRET.RET  Function returns address of local variable

UFM.DEREF.MIGHT  Use of free memory (access) - possible

UFM.DEREF.MUST  Use of Freed Memory by Pointer

UFM.FFM.MIGHT  Use of free memory (double free) - possible

UFM.FFM.MUST  Freeing Freed Memory

UFM.RETURN.MIGHT  Use of freed memory (return) - possible

UFM.RETURN.MUST  Use of Freed Memory on Return

UFM.USE.MIGHT  Use of free memory - possible

UFM.USE.MUST  Use of Freed Memory

UNINIT.HEAP.MIGHT  Uninitialized Heap Use - possible

UNINIT.HEAP.MUST  Uninitialized Heap Use

UNINIT.STACK.ARRAY.MIGHT  Uninitialized Array - possible

UNINIT.STACK.ARRAY.MUST  Uninitialized Array

UNINIT.STACK.ARRAY.PARTIAL.MUST  Partially Uninitialized Array

UNINIT.STACK.MIGHT  Uninitialized Variable - possible

UNINIT.STACK.MUST  Uninitialized Variable

HKMC P-EXP-005 (高): 存続期間であるオブジェクトにアクセスしないでください

CL.FFM.ASSIGN  Use of free memory (double free) - no operator=

CL.FFM.COPY  Use of free memory (double free) - no copy constructor

LOCRET.ARG  Function returns address of local variable

LOCRET.GLOB  Function returns address of local variable

LOCRET.RET  Function returns address of local variable

UFM.DEREF.MIGHT  Use of free memory (access) - possible

UFM.DEREF.MUST  Use of Freed Memory by Pointer

UFM.FFM.MIGHT  Use of free memory (double free) - possible

UFM.FFM.MUST  Freeing Freed Memory

UFM.RETURN.MIGHT  Use of freed memory (return) - possible

UFM.RETURN.MUST  Use of Freed Memory on Return

UFM.USE.MIGHT  Use of free memory - possible

UFM.USE.MUST  Use of Freed Memory

UNINIT.HEAP.MIGHT  Uninitialized Heap Use - possible

UNINIT.HEAP.MUST  Uninitialized Heap Use

UNINIT.STACK.ARRAY.MIGHT  Uninitialized Array - possible

UNINIT.STACK.ARRAY.MUST  Uninitialized Array

UNINIT.STACK.ARRAY.PARTIAL.MUST  Partially Uninitialized Array

UNINIT.STACK.MIGHT  Uninitialized Variable - possible

UNINIT.STACK.MUST  Uninitialized Variable

HKMC P-EXP-006 (Middle): Do not access a CV variable through a CV(const or volatile) unqualified variable

MISRA.CAST.CONST  Cast operation removes const or volatile modifier from a pointer or reference

HKMC P-EXP-006 (中): CV (const または volatile) 非修飾変数を介して CV 変数にアクセスしないでください

MISRA.CAST.CONST  Cast operation removes const or volatile modifier from a pointer or reference

HKMC P-EXP-007 (Middle): Calling va_start requires passing an object of the appropriate type

CERT.VA_START.TYPE  Pass an object of the correct type to va_start

HKMC P-EXP-007 (中): va_start を呼び出すには、適切なタイプのオブジェクトを渡す必要があります

CERT.VA_START.TYPE  Pass an object of the correct type to va_start

HKMC P-EXP-010 (High): Do not access the bits that are part of the object's value

CERT.MEMCMP.PADDED_DATA  Do not compare padding data

HKMC P-EXP-010 (高): オブジェクトの値の一部であるビットにアクセスしないでください

CERT.MEMCMP.PADDED_DATA  Do not compare padding data

HKMC P-FIO-002 (Middle): Close file pointers that are no longer needed

RH.LEAK  Resource leak

HKMC P-FIO-002 (中): 不要になったファイルポインターを閉じます

RH.LEAK  Resource leak

HKMC P-MEM-001 (High): Do not reference to deallocated memory

UFM.DEREF.MIGHT  Use of free memory (access) - possible

UFM.DEREF.MUST  Use of Freed Memory by Pointer

UFM.FFM.MIGHT  Use of free memory (double free) - possible

UFM.FFM.MUST  Freeing Freed Memory

UFM.RETURN.MIGHT  Use of freed memory (return) - possible

UFM.RETURN.MUST  Use of Freed Memory on Return

UFM.USE.MIGHT  Use of free memory - possible

UFM.USE.MUST  Use of Freed Memory

HKMC P-MEM-001 (高): 割り当て解除されたメモリを参照しないでください

UFM.DEREF.MIGHT  Use of free memory (access) - possible

UFM.DEREF.MUST  Use of Freed Memory by Pointer

UFM.FFM.MIGHT  Use of free memory (double free) - possible

UFM.FFM.MUST  Freeing Freed Memory

UFM.RETURN.MIGHT  Use of freed memory (return) - possible

UFM.RETURN.MUST  Use of Freed Memory on Return

UFM.USE.MIGHT  Use of free memory - possible

UFM.USE.MUST  Use of Freed Memory

HKMC P-MEM-002 (High): Properly deallocate dynamically allocated resources

CL.FMM  Freeing Mismatched Memory - in destructor

FMM.MIGHT  Freeing Mismatched Memory - possible

FMM.MUST  Freeing Mismatched Memory

HKMC P-MEM-002 (高): 動的に割り当てられたリソースを適切に割り当て解除します

CL.FMM  Freeing Mismatched Memory - in destructor

FMM.MIGHT  Freeing Mismatched Memory - possible

FMM.MUST  Freeing Mismatched Memory

HKMC P-MEM-004 (High): Explicitly construct and destruct objects when managing object lifecycle

CERT.MEM.OBJ_LIFETIME_CTOR  Uninitialized Heap Member Function Call

CERT.MEM.OBJ_LIFETIME_DTOR  Object with manually allocated memory not explicitly destroyed

HKMC P-MEM-004 (高): オブジェクトの有効期間を管理する場合はオブジェクトを明示的に構築および破棄する

CERT.MEM.OBJ_LIFETIME_CTOR  Uninitialized Heap Member Function Call

CERT.MEM.OBJ_LIFETIME_DTOR  Object with manually allocated memory not explicitly destroyed

HKMC P-MEM-005 (High): Provide placement new with properly aligned pointers to sufficient storage capacity

CERT.MEM.PLACEMENTNEW.MISALIGNED  Provide placement new with properly aligned storage

CERT.MEM.PLACEMENTNEW.TOOSMALL  Provide placement new with sufficient storage

HKMC P-MEM-005 (高): TBD

CERT.MEM.PLACEMENTNEW.MISALIGNED  Provide placement new with properly aligned storage

CERT.MEM.PLACEMENTNEW.TOOSMALL  Provide placement new with sufficient storage

HKMC P-MEM-006 (High): Do not store an already-owned pointer value in an unrelated smart pointer

CERT.MEM.SMART_PTR.OWNED  Multiple smart pointer owners of pointer

CERT.MEM.SMART_PTR.OWNED.THIS  The underlying resource might be already owned by a non-related smart pointer

HKMC P-MEM-006 (高): 既に所有されているポインター値を無関係なスマートポインターに格納しない

CERT.MEM.SMART_PTR.OWNED  Multiple smart pointer owners of pointer

CERT.MEM.SMART_PTR.OWNED.THIS  The underlying resource might be already owned by a non-related smart pointer

HKMC P-MEM-007 (Middle): Memory release missing after lifetime

MLK.MIGHT  Memory Leak - possible

MLK.MUST  Memory Leak

MLK.RET.MIGHT  Memory Leak - possible

MLK.RET.MUST  Memory Leak

HKMC P-MEM-007 (中): 存続期間後に欠落しているメモリ解放

MLK.MIGHT  Memory Leak - possible

MLK.MUST  Memory Leak

MLK.RET.MIGHT  Memory Leak - possible

MLK.RET.MUST  Memory Leak

HKMC P-MSC-001 (Middle): Do not use std::rand() for generating pseudo random number

CERT.MSC.STD_RAND_CALL  Do not use std::rand() for generating pseudorandom numbers

HKMC P-MSC-001 (中): 疑似乱数の生成には std::rand() を使用しないでください

CERT.MSC.STD_RAND_CALL  Do not use std::rand() for generating pseudorandom numbers

HKMC P-MSC-002 (Middle): Proper seeding for random number generator

AUTOSAR.STDLIB.RANDOM.NBR_GEN_DEFAULT_INIT  Random number engines shall not be default-initialized

CERT.MSC.SEED_RANDOM  Properly seed pseudorandom number generators

HKMC P-MSC-002 (中): 乱数発生器に適切なシード

AUTOSAR.STDLIB.RANDOM.NBR_GEN_DEFAULT_INIT  Random number engines shall not be default-initialized

CERT.MSC.SEED_RANDOM  Properly seed pseudorandom number generators

HKMC P-MSC-003 (Middle): Value returning function require returning values from all exit paths

FUNCRET.GEN  Non-void function does not return value

HKMC P-MSC-003 (中): 値を返す関数はすべての終了パスから値を返す必要があります

FUNCRET.GEN  Non-void function does not return value

HKMC P-MSC-004 (Middle): Do not return from function declared [[noreturn]]

CERT.MSC.NORETURN_FUNC_RETURNS  Do not return from a function declared [[noreturn]]

HKMC P-MSC-004 (中): [[noreturn]] を宣言した関数から返さないでください

CERT.MSC.NORETURN_FUNC_RETURNS  Do not return from a function declared [[noreturn]]

HKMC P-MSC-005 (Middle): Return of stack variable address

LOCRET.ARG  Function returns address of local variable

LOCRET.GLOB  Function returns address of local variable

LOCRET.RET  Function returns address of local variable

HKMC P-MSC-005 (中): スタック変数アドレスを返す

LOCRET.ARG  Function returns address of local variable

LOCRET.GLOB  Function returns address of local variable

LOCRET.RET  Function returns address of local variable

HKMC P-OOP-001 (Low): Do not invoke virtual functions from constructors or destructors

CERT.OOP.CTOR.VIRTUAL_FUNC  Do not invoke virtual functions from constructors or destructors

HKMC P-OOP-001 (低): コントラクターまたはデストラクターから仮想関数を呼び出さないでください

CERT.OOP.CTOR.VIRTUAL_FUNC  Do not invoke virtual functions from constructors or destructors

HKMC P-OOP-003 (Low): Do not delete a polymorphic object without a virtual destructor

CL.MLK.VIRTUAL  Memory Leak - possible in destructor

CWARN.DTOR.NONVIRT.DELETE  Delete expression for an object of a class with virtual methods and no virtual destructor

HKMC P-OOP-003 (低): 仮想デストラクターなしで多相オブジェクトを削除しないでください

CL.MLK.VIRTUAL  Memory Leak - possible in destructor

CWARN.DTOR.NONVIRT.DELETE  Delete expression for an object of a class with virtual methods and no virtual destructor

HKMC P-OOP-004 (Middle): Write constructor member initializers in the fixed order

CERT.OOP.CTOR.INIT_ORDER  Write constructor member initializers in the canonical order

HKMC P-OOP-004 (中): コンストラクターメンバーの初期化子を一定の順序で作成します

CERT.OOP.CTOR.INIT_ORDER  Write constructor member initializers in the canonical order

HKMC P-OOP-005 (Low): Correctly handle self-copy assignment

CL.SELF-ASSIGN  Use of free memory (double free) - in operator=

HKMC P-OOP-005 (低): セルフコピーの割り当てを正しく処理します

CL.SELF-ASSIGN  Use of free memory (double free) - in operator=

HKMC P-OOP-006 (High): Do not use pointer-to-member operators to access nonexistent members

CERT.OOP.PTR_MEMBER.NO_MEMBER  Do not use pointer-to-member operators to access nonexistent members

HKMC P-OOP-006 (高): メンバーへのポインター演算子を使用して、存在しないメンバーにアクセスしないでください

CERT.OOP.PTR_MEMBER.NO_MEMBER  Do not use pointer-to-member operators to access nonexistent members

HKMC P-OOP-007 (High): Prefer special member functions and overloaded operators over the C standard library

CERT.OOP.CSTD_FUNC_USE  Prefer special member functions and overloaded operators to C Standard Library functions

HKMC P-OOP-007 (高): C 標準ライブラリよりも特別なメンバー関数とオーバーロードされた演算子を優先します

CERT.OOP.CSTD_FUNC_USE  Prefer special member functions and overloaded operators to C Standard Library functions

HKMC P-OOP-008 (Low): Do not modify the source object in copy operators

CERT.OOP.COPY_MUTATES  Copy operations must not mutate the source object

HKMC P-OOP-008 (低): コピー演算子でソースオブジェクトを変更しないでください

CERT.OOP.COPY_MUTATES  Copy operations must not mutate the source object

HKMC P-OOP-009 (Middle): pubic static field do not mark as final

CXX.STATIC.OBJ.FINAL  Initialized public static field not mark as final

HKMC P-OOP-009 (中): 公開静的フィールドは最終としてマークされません

CXX.STATIC.OBJ.FINAL  Initialized public static field not mark as final

HKMC P-OOP-010 (Middle): Important data element public declaration

CXX.MEMBER.IMPORTANT.PRIVATE  Important member data shall be private

HKMC P-OOP-010 (中): 重要なデータ要素のパブリック宣言

CXX.MEMBER.IMPORTANT.PRIVATE  Important member data shall be private

HKMC P-OOP-011 (High): Access critical private variables through public methods

CXX.MEMBER.CRITICAL.PUBLIC.METHOD  Critical private member data shall not be directly writable by a public method

HKMC P-OOP-011 (高): パブリックメソッドを介して重要なプライベート変数にアクセスします

CXX.MEMBER.CRITICAL.PUBLIC.METHOD  Critical private member data shall not be directly writable by a public method

HKMC P-STR-001 (High): Guarantee that storage for strings has sufficient space for character data and the null terminator

NNTS.MIGHT  Buffer Overflow - Non-null Terminated String

NNTS.MUST  Buffer Overflow - Non-null Terminated String

SV.FMT_STR.BAD_SCAN_FORMAT  Input format specifier error

SV.UNBOUND_STRING_INPUT.CIN  Usage of cin for unbounded string input

SV.UNBOUND_STRING_INPUT.FUNC  Usage of unbounded string input

HKMC P-STR-001 (高): 文字列のストレージに文字データと null 終了文字のための十分なスペースがあることを保証します

NNTS.MIGHT  Buffer Overflow - Non-null Terminated String

NNTS.MUST  Buffer Overflow - Non-null Terminated String

SV.FMT_STR.BAD_SCAN_FORMAT  Input format specifier error

SV.UNBOUND_STRING_INPUT.CIN  Usage of cin for unbounded string input

SV.UNBOUND_STRING_INPUT.FUNC  Usage of unbounded string input

HKMC P-STR-003 (High): Do not use invalid references

ITER.CONTAINER.MODIFIED  Use of invalid iterator

HKMC P-STR-003 (高): basic_string を参照するときに、無効な参照、ポインター、および反復子を使用しないでください

ITER.CONTAINER.MODIFIED  Use of invalid iterator

P-CON-001

CERT.CONC.MUTEX.DESTROY_WHILE_LOCKED  Do not destroy a mutex while it is locked

P-CON-004

CONC.DL  Deadlock

P-CON-005

CERT.CONC.WAKE_IN_LOOP  Wrap functions that can spuriously wake up in a loop

P-CON-006

CERT.CONC.UNSAFE_COND_VAR  Preserve thread safety and liveness when using condition variables

P-CTR-001

ABV.ANY_SIZE_ARRAY  Buffer Overflow - Array Index Out of Bounds

ABV.GENERAL  Buffer Overflow - Array Index Out of Bounds

ABV.GENERAL.MULTIDIMENSION  Buffer Overflow - Array Index Out of Bounds

ABV.NON_ARRAY  Non-array object is used as an array

ABV.STACK  Buffer Overflow - Local Array Index Out of Bounds

ABV.TAINTED  Buffer Overflow from Unvalidated Input

SV.TAINTED.ALLOC_SIZE  Use of Unvalidated Integer in Memory Allocation

SV.TAINTED.CALL.INDEX_ACCESS  Use of Unvalidated Integer as Array Index by Function Call

SV.TAINTED.CALL.LOOP_BOUND  Use of Unvalidated Integer in Loop Condition through a Function Call

SV.TAINTED.INDEX_ACCESS  Use of Unvalidated Integer as Array Index

P-CTR-002

ITER.CONTAINER.MODIFIED  Use of invalid iterator

P-CTR-003

ITER.END.OUTPARAM.MIGHT  Use of 'end' as an output iterator

ITER.END.OUTPARAM.MUST  Use of 'end' as an output iterator

P-CTR-004

CXX.ITER.END.BEGIN  Iterator representing end of the range precedes start of range

ITER.INAPPROPRIATE  Use of iterator with inappropriate container object

ITER.INAPPROPRIATE.MULTIPLE  Use of iterator with inappropriate container object

P-CTR-006

ITER.ADVANCE.NONADJACENT  Advancing iterator by a distance of more than 1

P-DCL-001

MISRA.FUNC.VARARG  Function with variable number of arguments

P-DCL-002

MISRA.DEFINE.WRONGNAME  Usage of a name from the standard library for naming a macro

MISRA.DEFINE.WRONGNAME.UNDERSCORE  Usage of a reserved name for naming a macro

MISRA.STDLIB.WRONGNAME  Reused name of standard library macro, object or function

MISRA.STDLIB.WRONGNAME.UNDERSCORE  Usage of a reserved name for naming a language entity

MISRA.UNDEF.WRONGNAME  Undefinition of a name from the standard library

MISRA.UNDEF.WRONGNAME.UNDERSCORE  Undefinition of a reserved name

P-DCL-003

CERT.DCL.REF_TYPE.CONST_OR_VOLATILE  Never qualify a reference type with const or volatile

P-DCL-004

CERT.DCL.AMBIGUOUS_DECL  Do not write syntactically ambiguous declarations

P-DCL-005

CERT.DCL.SAME_SCOPE_ALLOC_DEALLOC  Overload allocation and deallocation functions as a pair in the same scope

P-DCL-006

PORTING.STORAGE.STRUCT  Byte position of elements in a structure could depend on alignment and packing attributes.

P-DCL-007

CXX.STATIC.OBJ.RECURSION  Do not reenter function during initialization of static objects

P-DCL-008

MISRA.DTOR.THROW  Throw in destructor

P-DCL-009

CERT.DCL.STD_NS_MODIFIED  Do not modify the standard namespaces

P-DCL-010

MISRA.NAMESPACE.UNMD  Unnamed namespace in header file

P-DCL-011

AUTOSAR.ADD.ONEDEFRULE.FUNC  Function is violating one definition rule

AUTOSAR.ADD.ONEDEFRULE.VAR  Variable is violating one definition rule

MISRA.CT.UNIQUE.ID  Identifier clashes with tag name

MISRA.TYPE.NAMECLASH.CPP.2008  Identifier in one name space has same spelling as identifier in other name space

MISRA.TYPEDEF.NOT_UNIQUE  Typedef name is used for another entity

P-ERR-001

CERT.ERR.ABRUPT_TERM  Do not abruptly terminate the program

P-ERR-003

MISRA.STDLIB.LONGJMP  Use of setjmp macro or longjmp function

P-ERR-004

MISRA.CTOR.TRY.NON_STATIC  Function try/catch block of constructor or destructor references non-static members

P-ERR-005

MISRA.CATCH.NOALL  Ellipsis exception handler is not the last one in a try-catch block

MISRA.CATCH.WRONGORD  Handler for a base exception class precedes to a handler for a derived exception class in a try-catch block

P-ERR-008

CL.MLK  Memory Leak - in destructor

MLK.MIGHT  Memory Leak - possible

MLK.MUST  Memory Leak

MLK.RET.MIGHT  Memory Leak - possible

MLK.RET.MUST  Memory Leak

RH.LEAK  Resource leak

P-ERR-010

MISRA.CATCH.BY_VALUE  Exception object of class type is caught by value

P-ERR-011

CERT.ERR.CONV.STR_TO_NUM  Detect errors when converting a string to a number

P-EXP-001

CERT.EXPR.PARENS  The precedence of operators within expressions should be made explicit.

MISRA.EXPR.PARENS.INSUFFICIENT  Limited dependence required for operator precedence rules in expressions

MISRA.INCR_DECR.OTHER  Increment or decrement operator is mixed with other operators in expression

MISRA.INCR_DECR.SIDEEFF.2012  A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator

PORTING.VAR.EFFECTS  Variable used twice in one expression where one usage is subject to side-effects

P-EXP-002

CERT.EXPR.DELETE_ARR.BASE_PTR  Do not delete an array through a pointer of the incorrect type

P-EXP-003

MISRA.SIZEOF.SIDE_EFFECT  Operand of sizeof has side effects

P-EXP-004

UNINIT.CTOR.MIGHT  Uninitialized Variable in Constructor - possible

UNINIT.CTOR.MUST  Uninitialized Variable in Constructor

UNINIT.HEAP.MIGHT  Uninitialized Heap Use - possible

UNINIT.HEAP.MUST  Uninitialized Heap Use

UNINIT.STACK.ARRAY.MIGHT  Uninitialized Array - possible

UNINIT.STACK.ARRAY.MUST  Uninitialized Array

UNINIT.STACK.ARRAY.PARTIAL.MUST  Partially Uninitialized Array

UNINIT.STACK.MIGHT  Uninitialized Variable - possible

UNINIT.STACK.MUST  Uninitialized Variable

P-EXP-005

CL.FFM.ASSIGN  Use of free memory (double free) - no operator=

CL.FFM.COPY  Use of free memory (double free) - no copy constructor

LOCRET.ARG  Function returns address of local variable

LOCRET.GLOB  Function returns address of local variable

LOCRET.RET  Function returns address of local variable

UFM.DEREF.MIGHT  Use of free memory (access) - possible

UFM.DEREF.MUST  Use of Freed Memory by Pointer

UFM.FFM.MIGHT  Use of free memory (double free) - possible

UFM.FFM.MUST  Freeing Freed Memory

UFM.RETURN.MIGHT  Use of freed memory (return) - possible

UFM.RETURN.MUST  Use of Freed Memory on Return

UFM.USE.MIGHT  Use of free memory - possible

UFM.USE.MUST  Use of Freed Memory

UNINIT.HEAP.MIGHT  Uninitialized Heap Use - possible

UNINIT.HEAP.MUST  Uninitialized Heap Use

UNINIT.STACK.ARRAY.MIGHT  Uninitialized Array - possible

UNINIT.STACK.ARRAY.MUST  Uninitialized Array

UNINIT.STACK.ARRAY.PARTIAL.MUST  Partially Uninitialized Array

UNINIT.STACK.MIGHT  Uninitialized Variable - possible

UNINIT.STACK.MUST  Uninitialized Variable

P-EXP-006

MISRA.CAST.CONST  Cast operation removes const or volatile modifier from a pointer or reference

P-EXP-007

CERT.VA_START.TYPE  Pass an object of the correct type to va_start

P-EXP-010

CERT.MEMCMP.PADDED_DATA  Do not compare padding data

P-FIO-002

RH.LEAK  Resource leak

P-MEM-001

UFM.DEREF.MIGHT  Use of free memory (access) - possible

UFM.DEREF.MUST  Use of Freed Memory by Pointer

UFM.FFM.MIGHT  Use of free memory (double free) - possible

UFM.FFM.MUST  Freeing Freed Memory

UFM.RETURN.MIGHT  Use of freed memory (return) - possible

UFM.RETURN.MUST  Use of Freed Memory on Return

UFM.USE.MIGHT  Use of free memory - possible

UFM.USE.MUST  Use of Freed Memory

P-MEM-002

CL.FMM  Freeing Mismatched Memory - in destructor

FMM.MIGHT  Freeing Mismatched Memory - possible

FMM.MUST  Freeing Mismatched Memory

P-MEM-004

CERT.MEM.OBJ_LIFETIME_CTOR  Uninitialized Heap Member Function Call

CERT.MEM.OBJ_LIFETIME_DTOR  Object with manually allocated memory not explicitly destroyed

P-MEM-005

CERT.MEM.PLACEMENTNEW.MISALIGNED  Provide placement new with properly aligned storage

CERT.MEM.PLACEMENTNEW.TOOSMALL  Provide placement new with sufficient storage

P-MEM-006

CERT.MEM.SMART_PTR.OWNED  Multiple smart pointer owners of pointer

CERT.MEM.SMART_PTR.OWNED.THIS  The underlying resource might be already owned by a non-related smart pointer

P-MEM-007

MLK.MIGHT  Memory Leak - possible

MLK.MUST  Memory Leak

MLK.RET.MIGHT  Memory Leak - possible

MLK.RET.MUST  Memory Leak

P-MSC-001

CERT.MSC.STD_RAND_CALL  Do not use std::rand() for generating pseudorandom numbers

P-MSC-002

AUTOSAR.STDLIB.RANDOM.NBR_GEN_DEFAULT_INIT  Random number engines shall not be default-initialized

CERT.MSC.SEED_RANDOM  Properly seed pseudorandom number generators

P-MSC-003

FUNCRET.GEN  Non-void function does not return value

P-MSC-004

CERT.MSC.NORETURN_FUNC_RETURNS  Do not return from a function declared [[noreturn]]

P-MSC-005

LOCRET.ARG  Function returns address of local variable

LOCRET.GLOB  Function returns address of local variable

LOCRET.RET  Function returns address of local variable

P-OOP-001

CERT.OOP.CTOR.VIRTUAL_FUNC  Do not invoke virtual functions from constructors or destructors

P-OOP-003

CL.MLK.VIRTUAL  Memory Leak - possible in destructor

CWARN.DTOR.NONVIRT.DELETE  Delete expression for an object of a class with virtual methods and no virtual destructor

P-OOP-004

CERT.OOP.CTOR.INIT_ORDER  Write constructor member initializers in the canonical order

P-OOP-005

CL.SELF-ASSIGN  Use of free memory (double free) - in operator=

P-OOP-006

CERT.OOP.PTR_MEMBER.NO_MEMBER  Do not use pointer-to-member operators to access nonexistent members

P-OOP-007

CERT.OOP.CSTD_FUNC_USE  Prefer special member functions and overloaded operators to C Standard Library functions

P-OOP-008

CERT.OOP.COPY_MUTATES  Copy operations must not mutate the source object

P-OOP-009

CXX.STATIC.OBJ.FINAL  Initialized public static field not mark as final

P-OOP-010

CXX.MEMBER.IMPORTANT.PRIVATE  Important member data shall be private

P-OOP-011

CXX.MEMBER.CRITICAL.PUBLIC.METHOD  Critical private member data shall not be directly writable by a public method

P-STR-001

NNTS.MIGHT  Buffer Overflow - Non-null Terminated String

NNTS.MUST  Buffer Overflow - Non-null Terminated String

SV.FMT_STR.BAD_SCAN_FORMAT  Input format specifier error

SV.UNBOUND_STRING_INPUT.CIN  Usage of cin for unbounded string input

SV.UNBOUND_STRING_INPUT.FUNC  Usage of unbounded string input

P-STR-003

ITER.CONTAINER.MODIFIED  Use of invalid iterator

and iterators to reference element of a container

ITER.CONTAINER.MODIFIED  Use of invalid iterator

and iterators when referencing to basic_string

ITER.CONTAINER.MODIFIED  Use of invalid iterator

pointer

ITER.CONTAINER.MODIFIED  Use of invalid iterator

pointers

ITER.CONTAINER.MODIFIED  Use of invalid iterator

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