このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
C++ の例外の欠陥
関数
noexcept
での未処理例外や throw
ステートメントで報告される予期せぬ例外など、C++ 例外およびその処理に関する欠陥これらの欠陥は C++ 例外処理に関連しています。欠陥には次のものがあります。
関数
noexcept
から発生する未処理例外throw
ステートメントの引数オブジェクトの構築中に発生する予期せぬ例外参照ではなく値による例外をキャッチする
catch
ステートメント後続の
catch
ステートメントを隠すcatch
ステートメント
Polyspace 結果
例外が値によってキャッチされました | catch ステートメントがオブジェクトを値によって受け取る |
前のハンドラーによって隠された例外ハンドラーです | 同じ例外に対して catch ステートメントが先行しているため、catch ステートメントに到達しない |
関数 noexcept が例外で終了 | 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 の引数が予期せぬ例外を発生 | The argument expression in a throw statement raises unexpected
exceptions, leading to resource leaks and security vulnerabilities |
キャッチされていない例外 | An exception is raised from a function but it is not caught and handled (R2022b 以降) |
throw の引数式が 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 (R2023b 以降) |
トピック
- Bug Finder 欠陥グループ
Bug Finder の欠陥チェッカーは、データ フロー、同時実行、数値などのグループに分類されています。