Struct haybale_pitchfork::ConstantTimeResultForFunction [−][src]
pub struct ConstantTimeResultForFunction<'a> {
pub funcname: &'a str,
pub path_results: Vec<ConstantTimeResultForPath>,
pub block_coverage: HashMap<String, BlockCoverage>,
pub error_filename: Option<String>,
pub coverage_filename: Option<String>,
// some fields omitted
}
Expand description
Holds information about the results of a constant-time analysis of a particular function.
Fields
funcname: &'a str
Name of the toplevel function we analyzed
path_results: Vec<ConstantTimeResultForPath>
the ConstantTimeResultForPath
s for each path in that function.
Note that since we can’t progress beyond a NotConstantTime
or
OtherError
result on a particular path, there may be many more paths
than the ones listed here.
We simply have no way of knowing how many more paths there might be
beyond one of these errors.
block_coverage: HashMap<String, BlockCoverage>
Map from function names to statistics on the block coverage of those functions. Functions not appearing in the map were not encountered on any path, or were hooked.
Note that in the case of ConstantTimeResultForPath::NotConstantTime
or
ConstantTimeResultForPath::OtherError
, the coverage stats consider the
block in which the error occurred to be covered, even if the portion of
the block after where the error occurred was not covered.
error_filename: Option<String>
If we logged all the detailed error messages, then this is the name of
the file they were logged to.
Otherwise, if this is None
, we did not log the detailed error messages.
(In either case, all the detailed error messages are available in the
path_results
field above.)
coverage_filename: Option<String>
If we dumped detailed coverage stats, then this is the name of the file
that we dumped to.
Otherwise, if this is None
, we did not dump the detailed coverage
stats.
(In either case, coverage stats are available in the block_coverage
field above.)
Implementations
Return the violation_message
for the first NotConstantTime
result
encountered, if there is one.
Return the first NotConstantTime
or OtherError
result encountered,
if there is one.