You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/analyses/assert.ml
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,15 +23,19 @@ struct
23
23
matchQueries.eval_bool (Analyses.ask_of_man man) e with
24
24
|`Liftedfalse ->
25
25
assert_msg Error"Assertion \"%a\" will fail."CilType.Exp.pretty e;
26
+
Checks.error Checks.Category.AssertionFailure"Assertion \"%a\" will fail."CilType.Exp.pretty e;
26
27
if refine then raise Analyses.Deadcodeelse man.local
27
28
|`Liftedtrue ->
28
29
assert_msg Success"Assertion \"%a\" will succeed"CilType.Exp.pretty e;
30
+
Checks.safe_msg Checks.Category.AssertionFailure"Assertion \"%a\" will succeed"CilType.Exp.pretty e;
29
31
man.local
30
32
|`Bot ->
31
33
M.error ~category:Assert"Assertion \"%a\" produces a bottom. What does that mean? (currently uninitialized arrays' content is bottom)"CilType.Exp.pretty e;
34
+
Checks.error Checks.Category.AssertionFailure"Assertion \"%a\" produces a bottom. What does that mean? (currently uninitialized arrays' content is bottom)"CilType.Exp.pretty e;
32
35
man.local
33
36
|`Top ->
34
37
assert_msg Warning"Assertion \"%a\" is unknown."CilType.Exp.pretty e;
38
+
Checks.warn Checks.Category.AssertionFailure"Assertion \"%a\" is unknown."CilType.Exp.pretty e;
M.warn ~category:(Behavior (UndefinedInvalidMemoryDeallocation)) ~tags:[CWE590] "Points-to set for pointer %a in function %s is top. Potentially invalid memory deallocation may occur" d_exp ptr special_fn.vname
2276
+
M.warn ~category:(Behavior (UndefinedInvalidMemoryDeallocation)) ~tags:[CWE590] "Points-to set for pointer %a in function %s is top. Potentially invalid memory deallocation may occur" d_exp ptr special_fn.vname;
2277
+
Checks.warn Checks.Category.InvalidMemoryAccess"Points-to set for pointer %a in function %s is top. Potentially invalid memory deallocation may occur" d_exp ptr special_fn.vname
M.warn ~category:(Behavior (UndefinedInvalidMemoryDeallocation)) ~tags:[CWE590] "Free of non-dynamically allocated memory in function %s for pointer %a" special_fn.vname d_exp ptr
2280
+
M.warn ~category:(Behavior (UndefinedInvalidMemoryDeallocation)) ~tags:[CWE590] "Free of non-dynamically allocated memory in function %s for pointer %a" special_fn.vname d_exp ptr;
2281
+
Checks.warn Checks.Category.InvalidMemoryAccess"Free of non-dynamically allocated memory in function %s for pointer %a" special_fn.vname d_exp ptr
M.warn ~category:(Behavior (UndefinedInvalidMemoryDeallocation)) ~tags:[CWE761] "Free of memory not at start of buffer in function %s for pointer %a" special_fn.vname d_exp ptr
2284
+
M.warn ~category:(Behavior (UndefinedInvalidMemoryDeallocation)) ~tags:[CWE761] "Free of memory not at start of buffer in function %s for pointer %a" special_fn.vname d_exp ptr;
2285
+
Checks.warn Checks.Category.InvalidMemoryAccess"Free of memory not at start of buffer in function %s for pointer %a" special_fn.vname d_exp ptr
M.warn ~category:(Behavior (UndefinedInvalidMemoryDeallocation)) ~tags:[CWE590] "Pointer %a in function %s doesn't evaluate to a valid address. Invalid memory deallocation may occur" d_exp ptr special_fn.vname
2291
+
M.warn ~category:(Behavior (UndefinedInvalidMemoryDeallocation)) ~tags:[CWE590] "Pointer %a in function %s doesn't evaluate to a valid address. Invalid memory deallocation may occur" d_exp ptr special_fn.vname;
2292
+
Checks.warn Checks.Category.InvalidMemoryAccess"Pointer %a in function %s doesn't evaluate to a valid address. Invalid memory deallocation may occur" d_exp ptr special_fn.vname
2273
2293
2274
2294
letpoints_to_heap_onlymanptr=
2275
2295
match man.ask (Queries.MayPointTo ptr) with
@@ -2327,6 +2347,7 @@ struct
2327
2347
end
2328
2348
|_ ->
2329
2349
(M.warn "Pointer %a has a points-to-set of top. An invalid memory access might occur" d_exp ptr;
2350
+
Checks.warn Checks.Category.InvalidMemoryAccess"Pointer %a has a points-to-set of top. An invalid memory access might occur" d_exp ptr;
0 commit comments