mirror of
https://github.com/github/codeql.git
synced 2026-03-31 12:48:17 +02:00
Add MaD barrier guard model to make test pass
This commit is contained in:
@@ -4,3 +4,8 @@ extensions:
|
||||
extensible: barrierModel
|
||||
data:
|
||||
- ["main::sanitize", "ReturnValue", "test-barrier", "manual"]
|
||||
- addsTo:
|
||||
pack: codeql/rust-all
|
||||
extensible: barrierGuardModel
|
||||
data:
|
||||
- ["main::verify_safe", "Argument[0]", "true", "test-barrier", "manual"]
|
||||
|
||||
@@ -43,6 +43,6 @@ fn verify_safe(s: &str) -> bool {
|
||||
fn with_barrier_guard() {
|
||||
let s = source(1);
|
||||
if verify_safe(s) {
|
||||
sink(s); // $ SPURIOUS: hasValueFlow=1
|
||||
sink(s);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user