Consider inputs to these functions
(-system-inputs-from
)
Specify functions for which the analysis considers all possible input values
Since R2020a
Description
This option affects a Bug Finder analysis only.
Specify the functions in your code for which Polyspace® considers all possible input values. For each function that you specify with this option, the analysis considers all possible values of these inputs:
Each argument of the function.
Each read of a global variable by the function or one of its callees.
For the
main()
function, the analysis assumes that the global variables are initialized with value 0.Each read of a volatile variable by the function or one of its callees.
Each return of a stubbed function. a Bug Finder analysis stubs a function if you do not provide the body of the function in your source code.
Each read from an absolute address, such as:
int value = *((int*)0x1234);
Set Option
User interface (desktop products only): In your project configuration, the option is on the Bug Finder Analysis node. See Dependencies for other options that you must also enable.
User interface (Polyspace Platform, desktop products only): In your project configuration, the option is on the Static Analysis tab on the Defects and Coding Standards > Checkers Behavior node.
Command line and options
file: Use the option -system-inputs-from
. See Command-Line Information.
Why Use This Option
By default, Polyspace considers all possible input values for the main()
function
and tasks, if any, or uncalled functions with at least one callee if your code has no
main()
. Depending on the issue that you are investigating by running
the stricter checks, specify a different subset of functions to analyze.
Settings
Default:
auto
auto
Consider all possible values for inputs to
main()
function and tasks, if any. You specify tasks with these options.When the analyzed code has no
main()
, the analysis considers all possible values for inputs to uncalled functions with at least one callee.uncalled
Consider all possible values for inputs to all uncalled functions.
all
Consider all possible values for inputs to all functions.
custom
Enter function names or choose from a list.
Click to add a field and enter the function name.
Click to list functions in your code. Choose functions from the list.
Dependencies
This option is enabled only if you enable Run
stricter checks considering all values of system inputs
(-checks-using-system-input-values)
.
Tips
The analysis treats these standard library functions that read values from external sources as stubbed functions.
getchar
getc
fgetc
scanf
Command-Line Information
Parameter:
-system-inputs-from |
Value:
auto | uncalled | all | custom |
Default: auto |
Example (Bug Finder):
polyspace-bug-finder -sources |
Example (Bug Finder Server):
polyspace-bug-finder-server -sources |
Version History
Introduced in R2020a