La traduction de cette page n'est pas à jour. Cliquez ici pour voir la dernière version en anglais.
Défauts d’exceptions C++
Défauts liés aux exceptions C++ et à leur gestion, par exemple exceptions non gérées dans une fonction
noexcept
ou exceptions inattendues dues à une instruction throw
Ces défauts sont liés à la gestion des exceptions C++. Ces défauts incluent :
Exception non gérée provenant d'une fonction
noexcept
Exception inattendue survenant lors de la construction de l'objet argument d'une instruction
throw
Instructions
catch
détectant les exceptions par valeur plutôt que par référenceInstructions
catch
masquant les instructionscatch
suivantes.
Résultats Polyspace
Exception caught by value | catch statement accepts an object by
value |
Exception handler hidden by previous
handler | catch statement is not reached because
of an earlier catch statement for the same exception |
Noexcept function
exits with exception | Functions specified as noexcept ,
noexcept(true) or noexcept(<true condition>)
exits with an exception, which causes abnormal termination of program execution, leading to
resource leak and security vulnerability |
Throw argument raises
unexpected exception | The argument expression in a throw statement raises unexpected
exceptions, leading to resource leaks and security vulnerabilities |
Uncaught
exception | An exception is raised from a function but it is not caught and handled (depuis R2022b) |
Throw argument
expression calls new | The argument expression in a throw statement allocates memory by
calling new , which can result in abrupt termination of the program and
resource leaks (depuis R2023b) |
Rubriques
- Bug Finder Defect Groups
The Bug Finder defect checkers are classified into groups such as data flow, concurrency, numerical, and so on.