Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Generated Content
Info
title
Note

This page is automatically generated from the "Automated Detection" sections in the individual guidelines. Do not modify this page directly.

Version number:
5.0 

was automatically generated and should not be edited.

Note

The information on this page was provided by outside contributors and has not been verified by SEI CERT.

Tip

The table below can be re-ordered, by clicking column headers.

...

Include Page
LDRA_V
LDRA_V

Checker

Guideline

1 J EXP54-CPP. Do not access an object outside of its lifetime
1 Q EXP50-CPP. Do not depend on the order of evaluation for side effects
2 D MSC52-CPP. Value-returning functions must return a value from all exit paths
6 D DCL56-CPP. Avoid cycles during initialization of static objects
9 S EXP50-CPP. Do not depend on the order of evaluation for side effects
35 D EXP50-CPP. Do not depend on the order of evaluation for side effects
36 S MSC52-CPP. Value-returning functions must return a value from all exit paths
41 S DCL50-CPP. Do not define a C-style variadic function
42 D EXP54-CPP. Do not access an object outside of its lifetime
43 S ERR52-CPP. Do not use setjmp() or longjmp()
44 S OOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions
44 S MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers
45 D CTR50-CPP. Guarantee that container indices and iterators are within the valid range
45 D MEM52-CPP. Detect and handle memory allocation errors
47 S CTR50-CPP. Guarantee that container indices and iterators are within the valid range
50 D ERR57-CPP. Do not leak resources when handling exceptions
53 D EXP53-CPP. Do not read uninitialized memory
53 D EXP54-CPP. Do not access an object outside of its lifetime
54 S EXP52-CPP. Do not rely on side effects in unevaluated operands
56 D ERR55-CPP. Honor exception specifications
56 D ERR56-CPP. Guarantee exception safety
64 D MEM51-CPP. Properly deallocate dynamically allocated resources
64 X CTR50-CPP. Guarantee that container indices and iterators are within the valid range
66 X CTR50-CPP. Guarantee that container indices and iterators are within the valid range
66 X STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
67 D EXP50-CPP. Do not depend on the order of evaluation for side effects
68 X CTR50-CPP. Guarantee that container indices and iterators are within the valid range
69 D EXP53-CPP. Do not read uninitialized memory
69 X CTR50-CPP. Guarantee that container indices and iterators are within the valid range
70 S CTR54-CPP. Do not subtract iterators that do not refer to the same container
70 X CTR50-CPP. Guarantee that container indices and iterators are within the valid range
70 X STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
71 D ERR56-CPP. Guarantee exception safety
71 S EXP54-CPP. Do not access an object outside of its lifetime
71 X CTR50-CPP. Guarantee that container indices and iterators are within the valid range
71 X STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
72 D EXP50-CPP. Do not depend on the order of evaluation for side effects
77 D EXP54-CPP. Do not access an object outside of its lifetime
79 X CTR50-CPP. Guarantee that container indices and iterators are within the valid range
86 S DCL51-CPP. Do not declare or define a reserved identifier
87 S CTR54-CPP. Do not subtract iterators that do not refer to the same container
92 D OOP50-CPP. Do not invoke virtual functions from constructors or destructors
112 D MEM51-CPP. Properly deallocate dynamically allocated resources
122 S ERR50-CPP. Do not abruptly terminate the program
133 S EXP52-CPP. Do not rely on side effects in unevaluated operands
134 S EXP50-CPP. Do not depend on the order of evaluation for side effects
169 S EXP57-CPP. Do not cast or delete pointers to incomplete classes
203 S EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
206 S OOP53-CPP. Write constructor member initializers in the canonical order
218 S DCL51-CPP. Do not declare or define a reserved identifier
219 S DCL51-CPP. Do not declare or define a reserved identifier
232 S MEM51-CPP. Properly deallocate dynamically allocated resources
236 S MEM51-CPP. Properly deallocate dynamically allocated resources
239 S MEM51-CPP. Properly deallocate dynamically allocated resources
242 S EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
286 S DCL59-CPP. Do not define an unnamed namespace in a header file
286 S DCL60-CPP. Obey the one-definition rule
287 S DCL60-CPP. Obey the one-definition rule
296 S DCL53-CPP. Do not write syntactically ambiguous declarations
303 S OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
344 S EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
407 S MEM51-CPP. Properly deallocate dynamically allocated resources
437 S CTR54-CPP. Do not subtract iterators that do not refer to the same container
438 S CTR54-CPP. Do not subtract iterators that do not refer to the same container
453 S DCL57-CPP. Do not let exceptions escape from destructors or deallocation functions
455 S ERR61-CPP. Catch exceptions by lvalue reference
467 S OOP50-CPP. Do not invoke virtual functions from constructors or destructors
469 S MEM51-CPP. Properly deallocate dynamically allocated resources
470 S MEM51-CPP. Properly deallocate dynamically allocated resources
476 S CTR50-CPP. Guarantee that container indices and iterators are within the valid range
483 S MEM50-CPP. Do not access freed memory
483 S MEM51-CPP. Properly deallocate dynamically allocated resources
484 S MEM50-CPP. Do not access freed memory
484 S MEM51-CPP. Properly deallocate dynamically allocated resources
485 S MEM51-CPP. Properly deallocate dynamically allocated resources
489 S CTR50-CPP. Guarantee that container indices and iterators are within the valid range
489 S STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
512 S DCL59-CPP. Do not define an unnamed namespace in a header file
527 S ERR51-CPP. Handle all exceptions
527 S ERR56-CPP. Guarantee exception safety
541 S ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
549 S ERR53-CPP. Do not reference base classes or class data members in a constructor or destructor function-try-block handler
554 S EXP57-CPP. Do not cast or delete pointers to incomplete classes
556 S ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
565 S EXP54-CPP. Do not access an object outside of its lifetime
567 S CTR55-CPP. Do not use an additive operator on an iterator if the result would overflow
567 S CTR56-CPP. Do not use pointer arithmetic on polymorphic objects
580 S DCL51-CPP. Do not declare or define a reserved identifier
597 S MEM54-CPP. Provide placement new with properly aligned pointers to sufficient storage capacity
618 S EXP62-CPP. Do not access the bits of an object representation that are not part of the object's value representation
631 S EXP53-CPP. Do not read uninitialized memory
652 S EXP53-CPP. Do not read uninitialized memory

Checker

Guideline

PRE01-CPP. Use parentheses within macros around parameter namesPRE02-CPP. Macro replacement lists should be parenthesizedPRE03-CPP. Prefer typedefs to defines for encoding typesPRE04-CPP. Do not reuse a standard header file namePRE06-CPP. Enclose header files in an inclusion guardPRE07-CPP. Avoid using repeated question marksPRE31-CPP. Avoid side-effects in arguments to unsafe macrosDCL01-CPP. Do not reuse variable names in subscopesDCL04-CPP. Do not declare more than one variable per declarationDCL06-CPP. Use meaningful symbolic constants to represent literal values in program logicEXP00-CPP. Use parentheses for precedence of operationEXP06-CPP. Operands to the sizeof operator should not contain side effectsEXP19-CPP. Do not perform assignments in conditional expressionsEXP35-CPP. Do not cast away a const qualificationEXP36-CPP. Do not convert pointers into more strictly aligned pointer typesINT07-CPP. Use only explicitly signed or unsigned char type for numeric valuesINT09-CPP. Ensure enumeration constants map to unique valuesINT13-CPP. Use bitwise operators only on unsigned operandsARR01-CPP. Do not apply the sizeof operator to a pointer when taking the size of an arrayARR30-CPP. Guarantee that array and vector indices are within the valid rangeSTR34-CPP. Cast characters to unsigned types before converting to larger integer sizesMEM02-CPP. Immediately cast the result of a memory allocation function call into a pointer to the allocated typeMSC04-CPP. Use comments consistently and in a readable fashionMSC12-CPP. Detect and remove code that has no effectMSC30-CPP. Do not use the rand() function for generating pseudorandom numbers
1 QEXP30-CPP. Do not depend on order of evaluation between sequence points
134 SEXP30-CPP. Do not depend on order of evaluation between sequence points
248 SINT33-CPP. Ensure that division and modulo operations do not result in divide-by-zero errors
344 SEXP32-CPP. Do not access a volatile object through a non-volatile reference
35 DEXP30-CPP. Do not depend on order of evaluation between sequence points
39 SFLP30-CPP. Do not use floating point variables as loop counters
42 DDCL30-CPP. Declare objects with appropriate storage durations
43 DINT32-CPP. Ensure that operations on signed integers do not result in overflow
43 DINT33-CPP. Ensure that division and modulo operations do not result in divide-by-zero errors
433 SINT31-CPP. Ensure that integer conversions do not result in lost or misinterpreted data
434 SINT31-CPP. Ensure that integer conversions do not result in lost or misinterpreted data
493 SINT32-CPP. Ensure that operations on signed integers do not result in overflow
494 SINT32-CPP. Ensure that operations on signed integers do not result in overflow
573 SPRE30-CPP. Do not create a universal character name through concatenation
575 SDCL36-CPP. Do not declare an identifier with conflicting linkage classifications
591 SFIO38-CPP. Do not use a copy of a FILE object for input and output
71 SDCL30-CPP. Declare objects with appropriate storage durations
75 DFIO31-CPP. Do not simultaneously open the same file multiple times
82 DFIO44-CPP. Only use values for fsetpos() that are returned from fgetpos()
84 DFIO39-CPP. Do not alternately input and output from a stream without an intervening flush or positioning call
86 DFIO30-CPP. Exclude user input from format strings
9 SEXP30-CPP. Do not depend on order of evaluation between sequence points
93 SINT31-CPP. Ensure that integer conversions do not result in lost or misinterpreted data