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 |
A Thread Entry Point warning is issued at every code location corresponding to a modeled thread 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 Thread Entry Point class.
Note that signal handler entry points will trigger warnings of class Signal Handler Entry Point, not Thread Entry Point.
| Class Name | Thread Entry Point |
|---|---|
| Significance | diagnostic |
| Mnemonic | DIAG.THREAD.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="Thread 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. |
#include <pthread.h>
static pthread_t thread;
void *entry(void *ctx){ return NULL; }
void reg(void* (*f)(void*))
{
pthread_create(&thread, NULL, f, NULL); /* Warning noting that entry is a thread entry point issued here */
}
void start(void)
{ reg(entry); }
Thread Entry Point warnings can be triggered by any function treated as a thread entry point function by CodeSonar:
Note that the functions that can trigger a Thread Entry Point warning represent a strict subset of the functions that the CodeSonar analysis will treat as thread entry points. Note in particular that matching a FORCE_THREAD_ENTRY_NAMES or THREAD_ENTRY_METHOD_NAMES rule is not sufficient: there must be a library model indicating that the function is a thread entry point. For full details, see Concurrency Models: Thread Entry Points.
The following configuration file parameters affect checks for this warning class.
To report problems with this documentation, please visit https://support.codesecure.com/.