JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
Control can return from a function used as a computational exception signal handler. Behavior is undefined when this occurs.
| クラス名 | Return from Computational Exception Signal Handler | |||
|---|---|---|---|---|
| 日本語クラス名 | Return from Computational Exception Signal Handler | |||
| クラス分類 | セキュリティ (security) | |||
| ニーモニック | LANG.STRUCT.RFCESH | |||
| カテゴリー |
|
|||
| 対応言語 | C および C++ で利用可能です。 |
|||
| 有効/無効設定 | このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル
(configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Return from Computational Exception Signal Handler" |
#include <signal.h>
#include <stdlib.h>
void handle_return(int s) {
/* do error handling */
}
void handle_somereturn(int s) {
/* do error handling */
if (s < 5){
exit(1);
}
}
void handle_noreturn(int s) {
/* do error handling */
exit(1);
}
void lang_struct_rfcesh(void) {
signal(SIGILL, handle_return); /* 'Return from Computational Exception Signal Handler' warning issued here */
signal(SIGILL, handle_somereturn); /* 'Return from Computational Exception Signal Handler' warning issued here */
signal(SIGILL, handle_noreturn); /* ok: control doesn't return from handle_noreturn() on any path */
}
設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。
To report problems with this documentation, please visit https://support.codesecure.com/.