File tree Expand file tree Collapse file tree 5 files changed +6
-4
lines changed
tests/regression/39-signed-overflows Expand file tree Collapse file tree 5 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ dev-repo: "git+https://github.com/goblint/analyzer.git"
102102x-maintenance-intent: ["(latest)" "(latest).(latest-1)"] # also keep previous minor version (with two releases per year, always keep a SV-COMP release)
103103available: os-family != "bsd" & os-distribution != "alpine" & (arch != "arm64" | os = "macos")
104104pin-depends: [
105- [ "goblint-cil.2.0.9" "git+https://github.com/goblint/cil.git#e21285af8f4408ed5354b1674dab840c43e84712 " ]
105+ [ "goblint-cil.2.0.9" "git+https://github.com/goblint/cil.git#d4ff56f4994f8acbe1544f15a103748942645961 " ]
106106 # pinned for stability (https://github.com/goblint/analyzer/issues/1520), remove after new apron release
107107 [ "apron.v0.9.15" "git+https://github.com/antoinemine/apron.git#418a217c7a70dae3f422678f3aaba38ae374d91a" ]
108108]
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ post-messages: [
148148pin-depends: [
149149 [
150150 "goblint-cil.2.0.9"
151- "git+https://github.com/goblint/cil.git#e21285af8f4408ed5354b1674dab840c43e84712 "
151+ "git+https://github.com/goblint/cil.git#d4ff56f4994f8acbe1544f15a103748942645961 "
152152 ]
153153 [
154154 "apron.v0.9.15"
Original file line number Diff line number Diff line change 33x-maintenance-intent: ["(latest)" "(latest).(latest-1)"] # also keep previous minor version (with two releases per year, always keep a SV-COMP release)
44available: os-family != "bsd" & os-distribution != "alpine" & (arch != "arm64" | os = "macos")
55pin-depends: [
6- [ "goblint-cil.2.0.9" "git+https://github.com/goblint/cil.git#e21285af8f4408ed5354b1674dab840c43e84712 " ]
6+ [ "goblint-cil.2.0.9" "git+https://github.com/goblint/cil.git#d4ff56f4994f8acbe1544f15a103748942645961 " ]
77 # pinned for stability (https://github.com/goblint/analyzer/issues/1520), remove after new apron release
88 [ "apron.v0.9.15" "git+https://github.com/antoinemine/apron.git#418a217c7a70dae3f422678f3aaba38ae374d91a" ]
99]
Original file line number Diff line number Diff line change 22#include <limits.h>
33
44int main () {
5- int bad = INT_MIN % -1 ; // TODO WARN (overflow)
5+ int bad = INT_MIN % -1 ; // WARN (overflow)
66 int x , y ;
77 bad = x % y ; // WARN (div by zero and overflow, distinguished in cram test)
88 if (y != 0 ) {
Original file line number Diff line number Diff line change 11TODO: should warn about overflow in all three % -s
22 $ goblint -- enable warn . deterministic -- enable ana. int . interval 17 -mod-minus-1. c
3+ [Warning][Integer > Overflow][CWE-190] Signed integer overflow in % (17 -mod-minus-1. c: 5 : 9 -5: 26 )
34 [Warning][Integer > Overflow][CWE-190] Signed integer overflow in % (17 -mod-minus-1. c: 7 : 5 -7: 16 )
45 [Warning][Integer > Overflow][CWE-190] Signed integer overflow in % (17 -mod-minus-1. c: 9 : 9 -9: 20 )
56 [Warning][Integer > DivByZero][CWE-369] Second argument of modulo might be zero (17 -mod-minus-1. c: 7 : 5 -7: 16 )
@@ -10,6 +11,7 @@ TODO: should warn about overflow in all three %-s
1011
1112TODO: should warn about overflow in all three % -s
1213 $ goblint -- enable warn . deterministic -- enable ana. int . interval_set 17 -mod-minus-1. c
14+ [Warning][Integer > Overflow][CWE-190] Signed integer overflow in % (17 -mod-minus-1. c: 5 : 9 -5: 26 )
1315 [Warning][Integer > Overflow][CWE-190] Signed integer overflow in % (17 -mod-minus-1. c: 7 : 5 -7: 16 )
1416 [Warning][Integer > Overflow][CWE-190] Signed integer overflow in % (17 -mod-minus-1. c: 9 : 9 -9: 20 )
1517 [Warning][Integer > DivByZero][CWE-369] Second argument of modulo might be zero (17 -mod-minus-1. c: 7 : 5 -7: 16 )
You can’t perform that action at this time.
0 commit comments