Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Checker

Guideline

ALLOC.DF MEM51-CPP. Properly deallocate dynamically allocated resources
ALLOC.FNH MEM51-CPP. Properly deallocate dynamically allocated resources
ALLOC.LEAK FIO51-CPP. Close files when they are no longer needed
ALLOC.LEAK ERR56-CPP. Guarantee exception safety
ALLOC.LEAK ERR57-CPP. Do not leak resources when handling exceptions
ALLOC.TM MEM51-CPP. Properly deallocate dynamically allocated resources
ALLOC.UAF EXP54-CPP. Do not access an object outside of its lifetime
ALLOC.UAF CTR51-CPP. Use valid references, pointers, and iterators to reference elements of a container
ALLOC.UAF STR52-CPP. Use valid references, pointers, and iterators to reference elements of a basic_string
ALLOC.UAF MEM50-CPP. Do not access freed memory
BADFUNC.ABORT ERR50-CPP. Do not abruptly terminate the program
BADFUNC.ATOF ERR62-CPP. Detect errors when converting a string to a number
BADFUNC.ATOF ERR62-CPP. Detect errors when converting a string to a number
BADFUNC.ATOF ERR62-CPP. Detect errors when converting a string to a number
BADFUNC.ATOI ERR62-CPP. Detect errors when converting a string to a number
BADFUNC.BO.* CTR52-CPP. Guarantee that library functions do not overflow
BADFUNC.EXIT ERR50-CPP. Do not abruptly terminate the program
BADFUNC.LONGJMP ERR52-CPP. Do not use setjmp() or longjmp()
BADFUNC.MEMCMP EXP62-CPP. Do not access the bits of an object representation that are not part of the object's value representation
BADFUNC.MEMCMP OOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions
BADFUNC.MEMSET EXP62-CPP. Do not access the bits of an object representation that are not part of the object's value representation
BADFUNC.MEMSET OOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions
BADFUNC.RANDOM.RAND MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers
BADFUNC.SETJMP ERR52-CPP. Do not use setjmp() or longjmp()
CONCURRENCY.LOCK.ORDER CON53-CPP. Avoid deadlock by locking in a predefined order
IO.IOWOP FIO50-CPP. Do not alternately input and output from a file stream without an intervening positioning call
IO.OIWOP FIO50-CPP. Do not alternately input and output from a file stream without an intervening positioning call
IO.UAC EXP54-CPP. Do not access an object outside of its lifetime
LANG.CAST.COERCE INT50-CPP. Do not cast to an out-of-range enumeration value
LANG.CAST.OBJSLICE OOP51-CPP. Do not slice derived objects
LANG.CAST.PC.INC EXP57-CPP. Do not cast or delete pointers to incomplete classes
LANG.CAST.VALUE INT50-CPP. Do not cast to an out-of-range enumeration value
LANG.ID.NU.MK DCL51-CPP. Do not declare or define a reserved identifier
LANG.MEM.BO CTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.BO CTR52-CPP. Guarantee that library functions do not overflow
LANG.MEM.BO CTR53-CPP. Use valid iterator ranges
LANG.MEM.BO STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
LANG.MEM.BO STR53-CPP. Range check element access
LANG.MEM.BU CTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.BU STR53-CPP. Range check element access
LANG.MEM.NPD EXP63-CPP. Do not rely on the value of a moved-from object
LANG.MEM.TBA CTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.TBA STR53-CPP. Range check element access
LANG.MEM.TO CTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.TO STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
LANG.MEM.TO STR53-CPP. Range check element access
LANG.MEM.TU CTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.TU STR53-CPP. Range check element access
LANG.MEM.UVAR EXP53-CPP. Do not read uninitialized memory
LANG.STRUCT.CUP CTR54-CPP. Do not subtract iterators that do not refer to the same container
LANG.STRUCT.DECL.ANH DCL59-CPP. Do not define an unnamed namespace in a header file
LANG.STRUCT.DECL.RESERVED DCL51-CPP. Do not declare or define a reserved identifier
LANG.STRUCT.DEF.FDH DCL60-CPP. Obey the one-definition rule
LANG.STRUCT.DEF.ODH DCL60-CPP. Obey the one-definition rule
LANG.STRUCT.DNVD OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
LANG.STRUCT.ELLIPSIS DCL50-CPP. Do not define a C-style variadic function
LANG.STRUCT.INIT.CYCLE DCL56-CPP. Avoid cycles during initialization of static objects
LANG.STRUCT.INIT.OOMI OOP53-CPP. Write constructor member initializers in the canonical order
LANG.STRUCT.INIT.UNORDERED DCL56-CPP. Avoid cycles during initialization of static objects
LANG.STRUCT.MRS MSC52-CPP. Value-returning functions must return a value from all exit paths
LANG.STRUCT.PBB CTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.STRUCT.PPE CTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.STRUCT.RFNR MSC53-CPP. Do not return from a function declared [[noreturn]]
LANG.STRUCT.RPL EXP53-CPP. Do not read uninitialized memory
LANG.STRUCT.SUP CTR54-CPP. Do not subtract iterators that do not refer to the same container
LANG.STRUCT.UCTCH ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
LANG.STRUCT.VCALL_IN_CTOR OOP50-CPP. Do not invoke virtual functions from constructors or destructors
LANG.STRUCT.VCALL_IN_DTOR OOP50-CPP. Do not invoke virtual functions from constructors or destructors
MISC.MEM.NTERM STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator