Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cwe_checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
cwe_checker
Commits
d454a72f
Unverified
Commit
d454a72f
authored
Feb 16, 2022
by
Enkelmann
Committed by
GitHub
Feb 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix intra-documentation links (#290)
parent
5c75fb50
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
12 deletions
+29
-12
codestyle_checks.yml
.github/workflows/codestyle_checks.yml
+19
-2
Makefile
Makefile
+1
-0
mod.rs
...hecker_lib/src/analysis/string_abstraction/context/mod.rs
+1
-1
blk.rs
src/cwe_checker_lib/src/intermediate_representation/blk.rs
+5
-6
block_duplication_normalization.rs
...representation/project/block_duplication_normalization.rs
+3
-3
No files found.
.github/workflows/codestyle_checks.yml
View file @
d454a72f
...
...
@@ -6,6 +6,7 @@ on:
env
:
CARGO_TERM_COLOR
:
always
RUSTDOCFLAGS
:
-Dwarnings
jobs
:
fmt
:
...
...
@@ -38,4 +39,20 @@ jobs:
-
uses
:
actions-rs/cargo@v1
with
:
command
:
clippy
args
:
-- -D clippy::all -D missing_docs
\ No newline at end of file
args
:
-- -D clippy::all -D missing_docs
doc
:
name
:
Rustdoc
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions-rs/toolchain@v1
with
:
profile
:
minimal
toolchain
:
stable
override
:
true
components
:
rust-docs
-
uses
:
actions-rs/cargo@v1
with
:
command
:
doc
args
:
--no-deps --document-private-items
\ No newline at end of file
Makefile
View file @
d454a72f
...
...
@@ -21,6 +21,7 @@ compile_test_files:
codestyle-check
:
cargo fmt
--
--check
cargo clippy
--
-D
clippy::all
-D
missing_docs
RUSTDOCFLAGS
=
"-Dwarnings"
cargo doc
--no-deps
--document-private-items
clean
:
cargo clean
...
...
src/cwe_checker_lib/src/analysis/string_abstraction/context/mod.rs
View file @
d454a72f
...
...
@@ -52,7 +52,7 @@ pub struct Context<'a, T: AbstractDomain + DomainInsertion + HasTop + Eq + From<
/// The keys are of the form `(Def-TID, Current-Sub-TID)`
/// to distinguish the nodes for blocks contained in more than one function.
pub
block_first_def_set
:
HashSet
<
(
Tid
,
Tid
)
>
,
/// A map to get the node index of the `BlkEnd` node containing a given [`Jmp`].
/// A map to get the node index of the `BlkEnd` node containing a given [`Jmp`]
(crate::intermediate_representation::Jmp)
.
/// The keys are of the form `(Jmp-TID, Current-Sub-TID)`
/// to distinguish the nodes for blocks contained in more than one function.
pub
jmp_to_blk_end_node_map
:
HashMap
<
(
Tid
,
Tid
),
NodeIndex
>
,
...
...
src/cwe_checker_lib/src/intermediate_representation/blk.rs
View file @
d454a72f
use
super
::{
Def
,
Jmp
};
use
crate
::
prelude
::
*
;
use
super
::
*
;
use
crate
::
utils
::
log
::
LogMessage
;
use
std
::
collections
::
HashSet
;
...
...
@@ -34,7 +33,7 @@ pub struct Blk {
/// this field contains possible jump target addresses for the jump.
///
/// Note that possible targets of indirect calls are *not* contained,
/// since the [`Project
::make_block_to_sub_mapping_unique`] normalization pass assumes
/// since the [`Project
` normalization passes](Project::normalize) assume
/// that only intraprocedural jump targets are contained in this field.
pub
indirect_jmp_targets
:
Vec
<
Tid
>
,
}
...
...
@@ -75,9 +74,9 @@ impl Term<Blk> {
/// Note that substitution is only possible
/// if the input variables of the input expression itself did not change since the definition of said variable.
///
/// The expression propagation allows the
[`Project::substitute_trivial_expressions`] normalization pass
/// The expression propagation allows the
corresponding [`Project` normalization pass](Project::normalize)
/// to further simplify the generated expressions
/// and allows more dead stores to be removed during [dead variable elimination](
`crate::analysis::dead_variable_elimination`
).
/// and allows more dead stores to be removed during [dead variable elimination](
crate::analysis::dead_variable_elimination
).
pub
fn
propagate_input_expressions
(
&
mut
self
)
{
let
mut
insertable_expressions
=
Vec
::
new
();
for
def
in
self
.term.defs
.iter_mut
()
{
...
...
@@ -143,7 +142,7 @@ impl Term<Blk> {
/// Merge subsequent assignments to the same variable to a single assignment to that variable.
///
/// The value expressions of merged assignments can often be simplified later on
/// in the
[`Project::substitute_trivial_expressions`] normalization pass
.
/// in the
corresponding [`Project` normalization pass](Project::normalize)
.
pub
fn
merge_def_assignments_to_same_var
(
&
mut
self
)
{
let
mut
new_defs
=
Vec
::
new
();
let
mut
last_def_opt
=
None
;
...
...
src/cwe_checker_lib/src/intermediate_representation/project/block_duplication_normalization.rs
View file @
d454a72f
...
...
@@ -65,7 +65,7 @@ impl Project {
}
/// Generate a map from all `Sub` TIDs to the set TIDs of all contained blocks in the `Sub`.
/// Used for the [`
Project::
make_block_to_sub_mapping_unique`] normalization pass,
/// Used for the [`make_block_to_sub_mapping_unique`] normalization pass,
/// as this function assumes that there may exist blocks contained in more than one `Sub`.
fn
generate_sub_tid_to_contained_block_tids_map
(
&
self
,
...
...
@@ -110,7 +110,7 @@ impl Project {
/// The TIDs of jump and return targets are not adjusted in this function.
/// The returned map maps the TID of a `Sub` to the newly created blocks for that `Sub`.
///
/// This function is part of the [`
Project::
make_block_to_sub_mapping_unique`] normalization pass
/// This function is part of the [`make_block_to_sub_mapping_unique`] normalization pass
/// and should not be used for other purposes.
fn
duplicate_blocks_contained_in_several_subs
(
&
self
,
...
...
@@ -141,7 +141,7 @@ impl Project {
/// if the target block was duplicated by the [`Project::duplicate_blocks_contained_in_several_subs`] function,
/// so that the jumps target the correct blocks again.
///
/// This function is part of the [`
Project::
make_block_to_sub_mapping_unique`] normalization pass
/// This function is part of the [`make_block_to_sub_mapping_unique`] normalization pass
/// and should not be used for other purposes.
fn
append_jump_targets_with_sub_suffix_when_target_block_was_duplicated
(
&
mut
self
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment