File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed
src/cdomain/value/cdomains Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ let add_overflow_check ~(op:overflow_op) ~underflow ~overflow ik =
8888 let sign = if signed then " Signed" else " Unsigned" in
8989 let op =
9090 match op with
91+ (* explicitly distinguish binary and unary - *)
92+ | Binop (MinusA | MinusPP | MinusPI ) -> " binary -" (* only MinusA should probably be possible here *)
93+ | Unop Neg -> " unary -"
9194 | Binop bop -> CilType.Binop. show bop
9295 | Unop uop -> CilType.Unop. show uop
9396 | Cast -> " cast"
Original file line number Diff line number Diff line change 33 [Info] SV-COMP specification: CHECK ( init(main()), LTL(G ! overflow) )
44 [Warning][Integer > Overflow][CWE-190] Unsigned integer overflow in << (32 -no-ov. c: 5 : 6 -5: 159 )
55 [Warning][Integer > Overflow][CWE-190] Unsigned integer overflow in << (32 -no-ov. c: 5 : 6 -5: 159 )
6- [Warning][Integer > Overflow][CWE-191] Unsigned integer underflow in - (32 -no-ov. c: 5 : 6 -5: 159 )
6+ [Warning][Integer > Overflow][CWE-191] Unsigned integer underflow in unary - (32 -no-ov. c: 5 : 6 -5: 159 )
7+ [Warning][Integer > Overflow][CWE-191] Unsigned integer underflow in binary - (32 -no-ov. c: 5 : 6 -5: 159 )
78 [Warning][Integer > Overflow][CWE-190] Signed integer overflow in cast (32 -no-ov. c: 5 : 6 -5: 159 )
89 [Info][Deadcode] Logical lines of code (LLoC) summary:
910 live: 3
Original file line number Diff line number Diff line change 6161
6262 $ goblint -- enable ana.int.interval --enable witness.yaml.enabled --set witness.yaml.invariant-types '["location_invariant", "loop_invariant"]' --set sem.int.signed_overflow assume_none foo.c
6363 [Warning][Integer > Overflow][CWE- 190 ] Signed integer overflow in + (foo.c:4 :5 - 4 :8 )
64- [Warning][Integer > Overflow][CWE- 191 ] Signed integer underflow in - (foo.c:5 :5 - 5 :8 )
64+ [Warning][Integer > Overflow][CWE- 191 ] Signed integer underflow in binary - (foo.c:5 :5 - 5 :8 )
6565 [Info][Deadcode] Logical lines of code (LLoC) summary:
6666 live: 6
6767 dead: 0
Original file line number Diff line number Diff line change 9393
9494
9595 $ goblint -- enable ana.sv-comp.functions --enable ana.int.interval --enable witness.yaml.enabled --set witness.yaml.invariant-types '["location_invariant"]' issue-1356.c
96- [Warning][Integer > Overflow][CWE- 190 ][CWE- 191 ] Signed integer overflow and underflow in - (issue- 1356 .c:11 :10 - 11 :15 )
96+ [Warning][Integer > Overflow][CWE- 190 ][CWE- 191 ] Signed integer overflow and underflow in binary - (issue- 1356 .c:11 :10 - 11 :15 )
9797 [Info][Deadcode] Logical lines of code (LLoC) summary:
9898 live: 13
9999 dead: 0
You can’t perform that action at this time.
0 commit comments