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 |
The CodeSonar extension API allows users to implement checks for custom warning classes in a straightforward way, and to supplement CodeSonar's analysis by providing additional information about how the program should be interpreted.
CodeSonar provides C extension functions and macros for implementing custom warning checks that can be built directly into project code. The checks can be implemented either by directly adding check code into program files, or by writing special code wrappers in separate files linked into the CodeSonar project. For details, see Including Custom Checks.
There are several facets to the extension API functionality:
| user-defined attributes | Users can attach named attributes to any memory location, then update and test the values of these attributes. This provides a way to identify possible problem conditions. |
|---|---|
| replacement functions | csonar_replace_p() allows users to associate specific attribute updates and trigger checks with each call to p, or to implement a model for p. |
| memory tracking |
Given a specific memory location:
|
| warning triggers | Users can specify triggering conditions based on the values of program variables and/or user-defined attributes, then instruct CodeSonar to issue warnings when those triggers are satisfied. |
| Including Custom Checks | Methods for implementing and including checks that use the Extension API. |
|---|---|
| Attributes | More information on user-defined attributes. |
| CodeSonar Extension API Functions and Macros | Full documentation for the extension functions and macros. |
| Example/Tutorial: Custom Checking with the Extension API | Illustrates the use of CodeSonar extension API to construct checks for new warning classes. |
| Example/Tutorial: Custom Taint-Related Checks with the Extension API | Illustrates the use of the extension API to model taint-related properties of program artifacts, and check for uses of tainted values in sensitive contexts. |
To report problems with this documentation, please visit https://support.codesecure.com/.