C and C++ Binaries


DIAG.SIGHAND.ENTRY : Signal Handler Entry Point

Summary

A Signal Handler Entry Point warning is issued at every code location corresponding to a modeled signal handler entry point.

This class is provided for diagnostic purposes and does not (necessarily) correspond to vulnerabilities in the code. There are several cases in which it can be helpful to enable the Signal Handler Entry Point class.

Properties

Class Name Signal Handler Entry Point
Significance diagnostic
Mnemonic DIAG.SIGHAND.ENTRY
Categories None
Availability Available for C and C++.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Signal Handler Entry Point"

This class is for analysis diagnostics, rather than for warning about issues in your code. As such, it is generally not enabled by CodeSonar presets. In particular, it is not enabled by the all_warningclasses preset.

Example

#include <signal.h>

void handle(int s){}

void reg(void (*f)(int)){
    signal(SIGABRT, f); /* 'Signal Handler Entry Point' warning issued here */
}

void start(){
    reg(handle);
}

Notes

Signal Handler Entry Point warnings can be triggered by any function treated as a signal handler entry point function by CodeSonar:

For more information about how CodeSonar treats signal handlers, see Concurrency Models: Thread Entry Points.

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.