diff --git a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll index 2423a3a71a0a..03dbc56dc99c 100644 --- a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll +++ b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll @@ -404,7 +404,7 @@ predicate cmpWithLinearBound( * For example, if `t` is a signed 32-bit type then holds if `lb` is * `-2^31` and `ub` is `2^31 - 1`. */ -private predicate typeBounds(ArithmeticType t, float lb, float ub) { +private predicate typeBounds0(ArithmeticType t, float lb, float ub) { exists(IntegralType integralType, float limit | integralType = t and limit = 2.pow(8 * integralType.getSize()) | @@ -423,6 +423,42 @@ private predicate typeBounds(ArithmeticType t, float lb, float ub) { t instanceof FloatingPointType and lb = -(1.0 / 0.0) and ub = 1.0 / 0.0 } +/** + * Gets the underlying type for an enumeration `e`. + * + * If the enumeration does not have an explicit type we approximate it using + * the following rules: + * - The result type is always `signed`, and + * - if the largest value fits in an `int` the result is `int`. Otherwise, the + * result is `long`. + */ +private IntegralType getUnderlyingTypeForEnum(Enum e) { + result = e.getExplicitUnderlyingType() + or + not e.hasExplicitUnderlyingType() and + result.isSigned() and + exists(IntType intType | + if max(e.getAnEnumConstant().getValue().toFloat()) >= 2.pow(8 * intType.getSize() - 1) + then result instanceof LongType + else result = intType + ) +} + +/** + * Holds if `lb` and `ub` are the lower and upper bounds of the unspecified + * type `t`. + * + * For example, if `t` is a signed 32-bit type then holds if `lb` is + * `-2^31` and `ub` is `2^31 - 1`. + * + * Unlike `typeBounds0`, this predicate also handles `Enum` types. + */ +private predicate typeBounds(Type t, float lb, float ub) { + typeBounds0(t, lb, ub) + or + typeBounds0(getUnderlyingTypeForEnum(t), lb, ub) +} + private Type stripReference(Type t) { if t instanceof ReferenceType then result = t.(ReferenceType).getBaseType() else result = t } diff --git a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll index c3c3c2dd3e7e..19bed4c97229 100644 --- a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll +++ b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll @@ -513,7 +513,7 @@ private module BoundsEstimate { float getBoundsLimit() { // This limit is arbitrary, but low enough that it prevents timeouts on // specific observed customer databases (and the in the tests). - result = 2.0.pow(40) + result = 2.0.pow(29) } /** Gets the maximum number of bounds possible for `t` when widening is used. */ diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected index 0c520190c8b0..d1daa65e0f02 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected @@ -17,6 +17,67 @@ | minmax.c:26:37:26:37 | x | 1 | | minmax.c:26:40:26:40 | y | 2 | | minmax.c:26:43:26:43 | z | 0 | +| missing_bounds.cpp:40:5:40:20 | x | 0 | +| missing_bounds.cpp:40:5:40:20 | x | 0 | +| missing_bounds.cpp:41:5:41:20 | x | 0 | +| missing_bounds.cpp:41:5:41:20 | x | 0 | +| missing_bounds.cpp:42:5:42:20 | x | 0 | +| missing_bounds.cpp:42:5:42:20 | x | 0 | +| missing_bounds.cpp:43:5:43:20 | x | 0 | +| missing_bounds.cpp:43:5:43:20 | x | 0 | +| missing_bounds.cpp:44:5:44:20 | x | 0 | +| missing_bounds.cpp:44:5:44:20 | x | 0 | +| missing_bounds.cpp:45:5:45:20 | x | 0 | +| missing_bounds.cpp:45:5:45:20 | x | 0 | +| missing_bounds.cpp:46:5:46:20 | x | 0 | +| missing_bounds.cpp:46:5:46:20 | x | 0 | +| missing_bounds.cpp:47:5:47:20 | x | 0 | +| missing_bounds.cpp:47:5:47:20 | x | 0 | +| missing_bounds.cpp:48:5:48:20 | x | 0 | +| missing_bounds.cpp:48:5:48:20 | x | 0 | +| missing_bounds.cpp:49:5:49:20 | x | 0 | +| missing_bounds.cpp:49:5:49:20 | x | 0 | +| missing_bounds.cpp:50:5:50:20 | x | 0 | +| missing_bounds.cpp:50:5:50:20 | x | 0 | +| missing_bounds.cpp:51:5:51:20 | x | 0 | +| missing_bounds.cpp:51:5:51:20 | x | 0 | +| missing_bounds.cpp:52:5:52:20 | x | 0 | +| missing_bounds.cpp:52:5:52:20 | x | 0 | +| missing_bounds.cpp:53:5:53:20 | x | 0 | +| missing_bounds.cpp:53:5:53:20 | x | 0 | +| missing_bounds.cpp:54:5:54:20 | x | 0 | +| missing_bounds.cpp:54:5:54:20 | x | 0 | +| missing_bounds.cpp:55:5:55:20 | x | 0 | +| missing_bounds.cpp:55:5:55:20 | x | 0 | +| missing_bounds.cpp:56:5:56:20 | x | 0 | +| missing_bounds.cpp:56:5:56:20 | x | 0 | +| missing_bounds.cpp:57:5:57:20 | x | 0 | +| missing_bounds.cpp:57:5:57:20 | x | 0 | +| missing_bounds.cpp:58:5:58:20 | x | 0 | +| missing_bounds.cpp:58:5:58:20 | x | 0 | +| missing_bounds.cpp:59:5:59:20 | x | 0 | +| missing_bounds.cpp:59:5:59:20 | x | 0 | +| missing_bounds.cpp:60:5:60:20 | x | 0 | +| missing_bounds.cpp:60:5:60:20 | x | 0 | +| missing_bounds.cpp:61:5:61:20 | x | 0 | +| missing_bounds.cpp:61:5:61:20 | x | 0 | +| missing_bounds.cpp:62:5:62:20 | x | 0 | +| missing_bounds.cpp:62:5:62:20 | x | 0 | +| missing_bounds.cpp:63:5:63:20 | x | 0 | +| missing_bounds.cpp:63:5:63:20 | x | 0 | +| missing_bounds.cpp:64:5:64:20 | x | 0 | +| missing_bounds.cpp:64:5:64:20 | x | 0 | +| missing_bounds.cpp:65:5:65:21 | x | 0 | +| missing_bounds.cpp:65:5:65:21 | x | 0 | +| missing_bounds.cpp:66:5:66:21 | x | 0 | +| missing_bounds.cpp:66:5:66:21 | x | 0 | +| missing_bounds.cpp:67:5:67:21 | x | 0 | +| missing_bounds.cpp:67:5:67:21 | x | 0 | +| missing_bounds.cpp:68:5:68:21 | x | 0 | +| missing_bounds.cpp:68:5:68:21 | x | 0 | +| missing_bounds.cpp:69:5:69:21 | x | 0 | +| missing_bounds.cpp:69:5:69:21 | x | 0 | +| missing_bounds.cpp:72:12:72:12 | x | 0 | | test.c:8:5:8:9 | count | -2147483648 | | test.c:8:13:8:17 | count | -2147483648 | | test.c:10:10:10:14 | count | -2147483648 | diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/missing_bounds.cpp b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/missing_bounds.cpp new file mode 100644 index 000000000000..4c78d719053f --- /dev/null +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/missing_bounds.cpp @@ -0,0 +1,73 @@ +enum MY_ENUM { + A = 0x1, + B = 0x2, + C = 0x4, + D = 0x8, + E = 0x10, + F = 0x20, + G = 0x40, + H = 0x80, + I = 0x100, + J = 0x200, + L = 0x400, + M = 0x800, + N = 0x1000, + O = 0x2000, + P = 0x4000, + Q = 0x8000, + R = 0x10000, + S = 0x20000, + T = 0x40000, + U = 0x80000, + V = 0x100000, + W = 0x200000, + X = 0x400000, + Y = 0x800000, + Z = 0x1000000, + AA = 0x2000000, + AB = 0x4000000, + AC = 0x8000000, + AD = 0x10000000, + AE = 0x20000000 +}; + +typedef unsigned int MY_ENUM_FLAGS; + +MY_ENUM_FLAGS check_and_subs(MY_ENUM_FLAGS x) +{ + + #define CHECK_AND_SUB(flag) if ((x & flag) == flag) { x -= flag; } + CHECK_AND_SUB(A); + CHECK_AND_SUB(B); + CHECK_AND_SUB(C); + CHECK_AND_SUB(D); + CHECK_AND_SUB(E); + CHECK_AND_SUB(F); + CHECK_AND_SUB(G); + CHECK_AND_SUB(H); + CHECK_AND_SUB(I); + CHECK_AND_SUB(J); + CHECK_AND_SUB(L); + CHECK_AND_SUB(M); + CHECK_AND_SUB(N); + CHECK_AND_SUB(O); + CHECK_AND_SUB(P); + CHECK_AND_SUB(Q); + CHECK_AND_SUB(R); + CHECK_AND_SUB(S); + CHECK_AND_SUB(T); + CHECK_AND_SUB(U); + CHECK_AND_SUB(V); + CHECK_AND_SUB(W); + CHECK_AND_SUB(X); + CHECK_AND_SUB(Y); + CHECK_AND_SUB(Z); + CHECK_AND_SUB(AA); + CHECK_AND_SUB(AB); + CHECK_AND_SUB(AC); + CHECK_AND_SUB(AD); + CHECK_AND_SUB(AE); + #undef CHECK_AND_SUB + + return x; +} \ No newline at end of file diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.expected index 7d583e47f5bb..8a02673e988a 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.expected @@ -37,6 +37,397 @@ estimateNrOfBounds | minmax.c:26:37:26:37 | x | 1.0 | | minmax.c:26:40:26:40 | y | 1.0 | | minmax.c:26:43:26:43 | z | 2.0 | +| missing_bounds.cpp:2:9:2:11 | 1 | 1.0 | +| missing_bounds.cpp:3:9:3:11 | 2 | 1.0 | +| missing_bounds.cpp:4:9:4:11 | 4 | 1.0 | +| missing_bounds.cpp:5:9:5:11 | 8 | 1.0 | +| missing_bounds.cpp:6:9:6:12 | 16 | 1.0 | +| missing_bounds.cpp:7:9:7:12 | 32 | 1.0 | +| missing_bounds.cpp:8:9:8:12 | 64 | 1.0 | +| missing_bounds.cpp:9:9:9:12 | 128 | 1.0 | +| missing_bounds.cpp:10:9:10:13 | 256 | 1.0 | +| missing_bounds.cpp:11:9:11:13 | 512 | 1.0 | +| missing_bounds.cpp:12:9:12:13 | 1024 | 1.0 | +| missing_bounds.cpp:13:9:13:13 | 2048 | 1.0 | +| missing_bounds.cpp:14:9:14:14 | 4096 | 1.0 | +| missing_bounds.cpp:15:9:15:14 | 8192 | 1.0 | +| missing_bounds.cpp:16:9:16:14 | 16384 | 1.0 | +| missing_bounds.cpp:17:9:17:14 | 32768 | 1.0 | +| missing_bounds.cpp:18:9:18:15 | 65536 | 1.0 | +| missing_bounds.cpp:19:9:19:15 | 131072 | 1.0 | +| missing_bounds.cpp:20:9:20:15 | 262144 | 1.0 | +| missing_bounds.cpp:21:9:21:15 | 524288 | 1.0 | +| missing_bounds.cpp:22:9:22:16 | 1048576 | 1.0 | +| missing_bounds.cpp:23:9:23:16 | 2097152 | 1.0 | +| missing_bounds.cpp:24:9:24:16 | 4194304 | 1.0 | +| missing_bounds.cpp:25:9:25:16 | 8388608 | 1.0 | +| missing_bounds.cpp:26:9:26:17 | 16777216 | 1.0 | +| missing_bounds.cpp:27:10:27:18 | 33554432 | 1.0 | +| missing_bounds.cpp:28:10:28:18 | 67108864 | 1.0 | +| missing_bounds.cpp:29:10:29:18 | 134217728 | 1.0 | +| missing_bounds.cpp:30:10:30:19 | 268435456 | 1.0 | +| missing_bounds.cpp:31:10:31:19 | 536870912 | 1.0 | +| missing_bounds.cpp:40:5:40:19 | ... & ... | 1.0 | +| missing_bounds.cpp:40:5:40:19 | ... -= ... | 1.0 | +| missing_bounds.cpp:40:5:40:19 | ... == ... | 1.0 | +| missing_bounds.cpp:40:5:40:20 | (...) | 1.0 | +| missing_bounds.cpp:40:5:40:20 | x | 1.0 | +| missing_bounds.cpp:40:5:40:20 | x | 1.0 | +| missing_bounds.cpp:40:19:40:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:40:19:40:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:40:19:40:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:40:19:40:19 | A | 1.0 | +| missing_bounds.cpp:40:19:40:19 | A | 1.0 | +| missing_bounds.cpp:40:19:40:19 | A | 1.0 | +| missing_bounds.cpp:41:5:41:19 | ... & ... | 2.0 | +| missing_bounds.cpp:41:5:41:19 | ... -= ... | 2.0 | +| missing_bounds.cpp:41:5:41:19 | ... == ... | 1.0 | +| missing_bounds.cpp:41:5:41:20 | (...) | 2.0 | +| missing_bounds.cpp:41:5:41:20 | x | 2.0 | +| missing_bounds.cpp:41:5:41:20 | x | 2.0 | +| missing_bounds.cpp:41:19:41:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:41:19:41:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:41:19:41:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:41:19:41:19 | B | 1.0 | +| missing_bounds.cpp:41:19:41:19 | B | 1.0 | +| missing_bounds.cpp:41:19:41:19 | B | 1.0 | +| missing_bounds.cpp:42:5:42:19 | ... & ... | 4.0 | +| missing_bounds.cpp:42:5:42:19 | ... -= ... | 4.0 | +| missing_bounds.cpp:42:5:42:19 | ... == ... | 1.0 | +| missing_bounds.cpp:42:5:42:20 | (...) | 4.0 | +| missing_bounds.cpp:42:5:42:20 | x | 4.0 | +| missing_bounds.cpp:42:5:42:20 | x | 4.0 | +| missing_bounds.cpp:42:19:42:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:42:19:42:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:42:19:42:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:42:19:42:19 | C | 1.0 | +| missing_bounds.cpp:42:19:42:19 | C | 1.0 | +| missing_bounds.cpp:42:19:42:19 | C | 1.0 | +| missing_bounds.cpp:43:5:43:19 | ... & ... | 8.0 | +| missing_bounds.cpp:43:5:43:19 | ... -= ... | 8.0 | +| missing_bounds.cpp:43:5:43:19 | ... == ... | 1.0 | +| missing_bounds.cpp:43:5:43:20 | (...) | 8.0 | +| missing_bounds.cpp:43:5:43:20 | x | 8.0 | +| missing_bounds.cpp:43:5:43:20 | x | 8.0 | +| missing_bounds.cpp:43:19:43:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:43:19:43:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:43:19:43:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:43:19:43:19 | D | 1.0 | +| missing_bounds.cpp:43:19:43:19 | D | 1.0 | +| missing_bounds.cpp:43:19:43:19 | D | 1.0 | +| missing_bounds.cpp:44:5:44:19 | ... & ... | 16.0 | +| missing_bounds.cpp:44:5:44:19 | ... -= ... | 16.0 | +| missing_bounds.cpp:44:5:44:19 | ... == ... | 1.0 | +| missing_bounds.cpp:44:5:44:20 | (...) | 16.0 | +| missing_bounds.cpp:44:5:44:20 | x | 16.0 | +| missing_bounds.cpp:44:5:44:20 | x | 16.0 | +| missing_bounds.cpp:44:19:44:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:44:19:44:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:44:19:44:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:44:19:44:19 | E | 1.0 | +| missing_bounds.cpp:44:19:44:19 | E | 1.0 | +| missing_bounds.cpp:44:19:44:19 | E | 1.0 | +| missing_bounds.cpp:45:5:45:19 | ... & ... | 32.0 | +| missing_bounds.cpp:45:5:45:19 | ... -= ... | 32.0 | +| missing_bounds.cpp:45:5:45:19 | ... == ... | 1.0 | +| missing_bounds.cpp:45:5:45:20 | (...) | 32.0 | +| missing_bounds.cpp:45:5:45:20 | x | 32.0 | +| missing_bounds.cpp:45:5:45:20 | x | 32.0 | +| missing_bounds.cpp:45:19:45:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:45:19:45:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:45:19:45:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:45:19:45:19 | F | 1.0 | +| missing_bounds.cpp:45:19:45:19 | F | 1.0 | +| missing_bounds.cpp:45:19:45:19 | F | 1.0 | +| missing_bounds.cpp:46:5:46:19 | ... & ... | 64.0 | +| missing_bounds.cpp:46:5:46:19 | ... -= ... | 64.0 | +| missing_bounds.cpp:46:5:46:19 | ... == ... | 1.0 | +| missing_bounds.cpp:46:5:46:20 | (...) | 64.0 | +| missing_bounds.cpp:46:5:46:20 | x | 64.0 | +| missing_bounds.cpp:46:5:46:20 | x | 64.0 | +| missing_bounds.cpp:46:19:46:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:46:19:46:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:46:19:46:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:46:19:46:19 | G | 1.0 | +| missing_bounds.cpp:46:19:46:19 | G | 1.0 | +| missing_bounds.cpp:46:19:46:19 | G | 1.0 | +| missing_bounds.cpp:47:5:47:19 | ... & ... | 128.0 | +| missing_bounds.cpp:47:5:47:19 | ... -= ... | 128.0 | +| missing_bounds.cpp:47:5:47:19 | ... == ... | 1.0 | +| missing_bounds.cpp:47:5:47:20 | (...) | 128.0 | +| missing_bounds.cpp:47:5:47:20 | x | 128.0 | +| missing_bounds.cpp:47:5:47:20 | x | 128.0 | +| missing_bounds.cpp:47:19:47:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:47:19:47:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:47:19:47:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:47:19:47:19 | H | 1.0 | +| missing_bounds.cpp:47:19:47:19 | H | 1.0 | +| missing_bounds.cpp:47:19:47:19 | H | 1.0 | +| missing_bounds.cpp:48:5:48:19 | ... & ... | 256.0 | +| missing_bounds.cpp:48:5:48:19 | ... -= ... | 256.0 | +| missing_bounds.cpp:48:5:48:19 | ... == ... | 1.0 | +| missing_bounds.cpp:48:5:48:20 | (...) | 256.0 | +| missing_bounds.cpp:48:5:48:20 | x | 256.0 | +| missing_bounds.cpp:48:5:48:20 | x | 256.0 | +| missing_bounds.cpp:48:19:48:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:48:19:48:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:48:19:48:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:48:19:48:19 | I | 1.0 | +| missing_bounds.cpp:48:19:48:19 | I | 1.0 | +| missing_bounds.cpp:48:19:48:19 | I | 1.0 | +| missing_bounds.cpp:49:5:49:19 | ... & ... | 512.0 | +| missing_bounds.cpp:49:5:49:19 | ... -= ... | 512.0 | +| missing_bounds.cpp:49:5:49:19 | ... == ... | 1.0 | +| missing_bounds.cpp:49:5:49:20 | (...) | 512.0 | +| missing_bounds.cpp:49:5:49:20 | x | 512.0 | +| missing_bounds.cpp:49:5:49:20 | x | 512.0 | +| missing_bounds.cpp:49:19:49:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:49:19:49:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:49:19:49:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:49:19:49:19 | J | 1.0 | +| missing_bounds.cpp:49:19:49:19 | J | 1.0 | +| missing_bounds.cpp:49:19:49:19 | J | 1.0 | +| missing_bounds.cpp:50:5:50:19 | ... & ... | 1024.0 | +| missing_bounds.cpp:50:5:50:19 | ... -= ... | 1024.0 | +| missing_bounds.cpp:50:5:50:19 | ... == ... | 1.0 | +| missing_bounds.cpp:50:5:50:20 | (...) | 1024.0 | +| missing_bounds.cpp:50:5:50:20 | x | 1024.0 | +| missing_bounds.cpp:50:5:50:20 | x | 1024.0 | +| missing_bounds.cpp:50:19:50:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:50:19:50:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:50:19:50:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:50:19:50:19 | L | 1.0 | +| missing_bounds.cpp:50:19:50:19 | L | 1.0 | +| missing_bounds.cpp:50:19:50:19 | L | 1.0 | +| missing_bounds.cpp:51:5:51:19 | ... & ... | 2048.0 | +| missing_bounds.cpp:51:5:51:19 | ... -= ... | 2048.0 | +| missing_bounds.cpp:51:5:51:19 | ... == ... | 1.0 | +| missing_bounds.cpp:51:5:51:20 | (...) | 2048.0 | +| missing_bounds.cpp:51:5:51:20 | x | 2048.0 | +| missing_bounds.cpp:51:5:51:20 | x | 2048.0 | +| missing_bounds.cpp:51:19:51:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:51:19:51:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:51:19:51:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:51:19:51:19 | M | 1.0 | +| missing_bounds.cpp:51:19:51:19 | M | 1.0 | +| missing_bounds.cpp:51:19:51:19 | M | 1.0 | +| missing_bounds.cpp:52:5:52:19 | ... & ... | 4096.0 | +| missing_bounds.cpp:52:5:52:19 | ... -= ... | 4096.0 | +| missing_bounds.cpp:52:5:52:19 | ... == ... | 1.0 | +| missing_bounds.cpp:52:5:52:20 | (...) | 4096.0 | +| missing_bounds.cpp:52:5:52:20 | x | 4096.0 | +| missing_bounds.cpp:52:5:52:20 | x | 4096.0 | +| missing_bounds.cpp:52:19:52:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:52:19:52:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:52:19:52:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:52:19:52:19 | N | 1.0 | +| missing_bounds.cpp:52:19:52:19 | N | 1.0 | +| missing_bounds.cpp:52:19:52:19 | N | 1.0 | +| missing_bounds.cpp:53:5:53:19 | ... & ... | 8192.0 | +| missing_bounds.cpp:53:5:53:19 | ... -= ... | 8192.0 | +| missing_bounds.cpp:53:5:53:19 | ... == ... | 1.0 | +| missing_bounds.cpp:53:5:53:20 | (...) | 8192.0 | +| missing_bounds.cpp:53:5:53:20 | x | 8192.0 | +| missing_bounds.cpp:53:5:53:20 | x | 8192.0 | +| missing_bounds.cpp:53:19:53:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:53:19:53:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:53:19:53:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:53:19:53:19 | O | 1.0 | +| missing_bounds.cpp:53:19:53:19 | O | 1.0 | +| missing_bounds.cpp:53:19:53:19 | O | 1.0 | +| missing_bounds.cpp:54:5:54:19 | ... & ... | 16384.0 | +| missing_bounds.cpp:54:5:54:19 | ... -= ... | 16384.0 | +| missing_bounds.cpp:54:5:54:19 | ... == ... | 1.0 | +| missing_bounds.cpp:54:5:54:20 | (...) | 16384.0 | +| missing_bounds.cpp:54:5:54:20 | x | 16384.0 | +| missing_bounds.cpp:54:5:54:20 | x | 16384.0 | +| missing_bounds.cpp:54:19:54:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:54:19:54:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:54:19:54:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:54:19:54:19 | P | 1.0 | +| missing_bounds.cpp:54:19:54:19 | P | 1.0 | +| missing_bounds.cpp:54:19:54:19 | P | 1.0 | +| missing_bounds.cpp:55:5:55:19 | ... & ... | 32768.0 | +| missing_bounds.cpp:55:5:55:19 | ... -= ... | 32768.0 | +| missing_bounds.cpp:55:5:55:19 | ... == ... | 1.0 | +| missing_bounds.cpp:55:5:55:20 | (...) | 32768.0 | +| missing_bounds.cpp:55:5:55:20 | x | 32768.0 | +| missing_bounds.cpp:55:5:55:20 | x | 32768.0 | +| missing_bounds.cpp:55:19:55:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:55:19:55:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:55:19:55:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:55:19:55:19 | Q | 1.0 | +| missing_bounds.cpp:55:19:55:19 | Q | 1.0 | +| missing_bounds.cpp:55:19:55:19 | Q | 1.0 | +| missing_bounds.cpp:56:5:56:19 | ... & ... | 65536.0 | +| missing_bounds.cpp:56:5:56:19 | ... -= ... | 65536.0 | +| missing_bounds.cpp:56:5:56:19 | ... == ... | 1.0 | +| missing_bounds.cpp:56:5:56:20 | (...) | 65536.0 | +| missing_bounds.cpp:56:5:56:20 | x | 65536.0 | +| missing_bounds.cpp:56:5:56:20 | x | 65536.0 | +| missing_bounds.cpp:56:19:56:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:56:19:56:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:56:19:56:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:56:19:56:19 | R | 1.0 | +| missing_bounds.cpp:56:19:56:19 | R | 1.0 | +| missing_bounds.cpp:56:19:56:19 | R | 1.0 | +| missing_bounds.cpp:57:5:57:19 | ... & ... | 131072.0 | +| missing_bounds.cpp:57:5:57:19 | ... -= ... | 131072.0 | +| missing_bounds.cpp:57:5:57:19 | ... == ... | 1.0 | +| missing_bounds.cpp:57:5:57:20 | (...) | 131072.0 | +| missing_bounds.cpp:57:5:57:20 | x | 131072.0 | +| missing_bounds.cpp:57:5:57:20 | x | 131072.0 | +| missing_bounds.cpp:57:19:57:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:57:19:57:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:57:19:57:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:57:19:57:19 | S | 1.0 | +| missing_bounds.cpp:57:19:57:19 | S | 1.0 | +| missing_bounds.cpp:57:19:57:19 | S | 1.0 | +| missing_bounds.cpp:58:5:58:19 | ... & ... | 262144.0 | +| missing_bounds.cpp:58:5:58:19 | ... -= ... | 262144.0 | +| missing_bounds.cpp:58:5:58:19 | ... == ... | 1.0 | +| missing_bounds.cpp:58:5:58:20 | (...) | 262144.0 | +| missing_bounds.cpp:58:5:58:20 | x | 262144.0 | +| missing_bounds.cpp:58:5:58:20 | x | 262144.0 | +| missing_bounds.cpp:58:19:58:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:58:19:58:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:58:19:58:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:58:19:58:19 | T | 1.0 | +| missing_bounds.cpp:58:19:58:19 | T | 1.0 | +| missing_bounds.cpp:58:19:58:19 | T | 1.0 | +| missing_bounds.cpp:59:5:59:19 | ... & ... | 524288.0 | +| missing_bounds.cpp:59:5:59:19 | ... -= ... | 524288.0 | +| missing_bounds.cpp:59:5:59:19 | ... == ... | 1.0 | +| missing_bounds.cpp:59:5:59:20 | (...) | 524288.0 | +| missing_bounds.cpp:59:5:59:20 | x | 524288.0 | +| missing_bounds.cpp:59:5:59:20 | x | 524288.0 | +| missing_bounds.cpp:59:19:59:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:59:19:59:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:59:19:59:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:59:19:59:19 | U | 1.0 | +| missing_bounds.cpp:59:19:59:19 | U | 1.0 | +| missing_bounds.cpp:59:19:59:19 | U | 1.0 | +| missing_bounds.cpp:60:5:60:19 | ... & ... | 1048576.0 | +| missing_bounds.cpp:60:5:60:19 | ... -= ... | 1048576.0 | +| missing_bounds.cpp:60:5:60:19 | ... == ... | 1.0 | +| missing_bounds.cpp:60:5:60:20 | (...) | 1048576.0 | +| missing_bounds.cpp:60:5:60:20 | x | 1048576.0 | +| missing_bounds.cpp:60:5:60:20 | x | 1048576.0 | +| missing_bounds.cpp:60:19:60:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:60:19:60:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:60:19:60:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:60:19:60:19 | V | 1.0 | +| missing_bounds.cpp:60:19:60:19 | V | 1.0 | +| missing_bounds.cpp:60:19:60:19 | V | 1.0 | +| missing_bounds.cpp:61:5:61:19 | ... & ... | 2097152.0 | +| missing_bounds.cpp:61:5:61:19 | ... -= ... | 2097152.0 | +| missing_bounds.cpp:61:5:61:19 | ... == ... | 1.0 | +| missing_bounds.cpp:61:5:61:20 | (...) | 2097152.0 | +| missing_bounds.cpp:61:5:61:20 | x | 2097152.0 | +| missing_bounds.cpp:61:5:61:20 | x | 2097152.0 | +| missing_bounds.cpp:61:19:61:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:61:19:61:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:61:19:61:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:61:19:61:19 | W | 1.0 | +| missing_bounds.cpp:61:19:61:19 | W | 1.0 | +| missing_bounds.cpp:61:19:61:19 | W | 1.0 | +| missing_bounds.cpp:62:5:62:19 | ... & ... | 4194304.0 | +| missing_bounds.cpp:62:5:62:19 | ... -= ... | 4194304.0 | +| missing_bounds.cpp:62:5:62:19 | ... == ... | 1.0 | +| missing_bounds.cpp:62:5:62:20 | (...) | 4194304.0 | +| missing_bounds.cpp:62:5:62:20 | x | 4194304.0 | +| missing_bounds.cpp:62:5:62:20 | x | 4194304.0 | +| missing_bounds.cpp:62:19:62:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:62:19:62:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:62:19:62:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:62:19:62:19 | X | 1.0 | +| missing_bounds.cpp:62:19:62:19 | X | 1.0 | +| missing_bounds.cpp:62:19:62:19 | X | 1.0 | +| missing_bounds.cpp:63:5:63:19 | ... & ... | 8388608.0 | +| missing_bounds.cpp:63:5:63:19 | ... -= ... | 8388608.0 | +| missing_bounds.cpp:63:5:63:19 | ... == ... | 1.0 | +| missing_bounds.cpp:63:5:63:20 | (...) | 8388608.0 | +| missing_bounds.cpp:63:5:63:20 | x | 8388608.0 | +| missing_bounds.cpp:63:5:63:20 | x | 8388608.0 | +| missing_bounds.cpp:63:19:63:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:63:19:63:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:63:19:63:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:63:19:63:19 | Y | 1.0 | +| missing_bounds.cpp:63:19:63:19 | Y | 1.0 | +| missing_bounds.cpp:63:19:63:19 | Y | 1.0 | +| missing_bounds.cpp:64:5:64:19 | ... & ... | 1.6777216E7 | +| missing_bounds.cpp:64:5:64:19 | ... -= ... | 1.6777216E7 | +| missing_bounds.cpp:64:5:64:19 | ... == ... | 1.0 | +| missing_bounds.cpp:64:5:64:20 | (...) | 1.6777216E7 | +| missing_bounds.cpp:64:5:64:20 | x | 1.6777216E7 | +| missing_bounds.cpp:64:5:64:20 | x | 1.6777216E7 | +| missing_bounds.cpp:64:19:64:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:64:19:64:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:64:19:64:19 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:64:19:64:19 | Z | 1.0 | +| missing_bounds.cpp:64:19:64:19 | Z | 1.0 | +| missing_bounds.cpp:64:19:64:19 | Z | 1.0 | +| missing_bounds.cpp:65:5:65:20 | ... & ... | 3.3554432E7 | +| missing_bounds.cpp:65:5:65:20 | ... -= ... | 3.3554432E7 | +| missing_bounds.cpp:65:5:65:20 | ... == ... | 1.0 | +| missing_bounds.cpp:65:5:65:21 | (...) | 3.3554432E7 | +| missing_bounds.cpp:65:5:65:21 | x | 3.3554432E7 | +| missing_bounds.cpp:65:5:65:21 | x | 3.3554432E7 | +| missing_bounds.cpp:65:19:65:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:65:19:65:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:65:19:65:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:65:19:65:20 | AA | 1.0 | +| missing_bounds.cpp:65:19:65:20 | AA | 1.0 | +| missing_bounds.cpp:65:19:65:20 | AA | 1.0 | +| missing_bounds.cpp:66:5:66:20 | ... & ... | 6.7108864E7 | +| missing_bounds.cpp:66:5:66:20 | ... -= ... | 6.7108864E7 | +| missing_bounds.cpp:66:5:66:20 | ... == ... | 1.0 | +| missing_bounds.cpp:66:5:66:21 | (...) | 6.7108864E7 | +| missing_bounds.cpp:66:5:66:21 | x | 6.7108864E7 | +| missing_bounds.cpp:66:5:66:21 | x | 6.7108864E7 | +| missing_bounds.cpp:66:19:66:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:66:19:66:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:66:19:66:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:66:19:66:20 | AB | 1.0 | +| missing_bounds.cpp:66:19:66:20 | AB | 1.0 | +| missing_bounds.cpp:66:19:66:20 | AB | 1.0 | +| missing_bounds.cpp:67:5:67:20 | ... & ... | 1.34217728E8 | +| missing_bounds.cpp:67:5:67:20 | ... -= ... | 1.34217728E8 | +| missing_bounds.cpp:67:5:67:20 | ... == ... | 1.0 | +| missing_bounds.cpp:67:5:67:21 | (...) | 1.34217728E8 | +| missing_bounds.cpp:67:5:67:21 | x | 1.34217728E8 | +| missing_bounds.cpp:67:5:67:21 | x | 1.34217728E8 | +| missing_bounds.cpp:67:19:67:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:67:19:67:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:67:19:67:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:67:19:67:20 | AC | 1.0 | +| missing_bounds.cpp:67:19:67:20 | AC | 1.0 | +| missing_bounds.cpp:67:19:67:20 | AC | 1.0 | +| missing_bounds.cpp:68:5:68:20 | ... & ... | 2.68435456E8 | +| missing_bounds.cpp:68:5:68:20 | ... -= ... | 2.68435456E8 | +| missing_bounds.cpp:68:5:68:20 | ... == ... | 1.0 | +| missing_bounds.cpp:68:5:68:21 | (...) | 2.68435456E8 | +| missing_bounds.cpp:68:5:68:21 | x | 2.68435456E8 | +| missing_bounds.cpp:68:5:68:21 | x | 2.68435456E8 | +| missing_bounds.cpp:68:19:68:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:68:19:68:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:68:19:68:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:68:19:68:20 | AD | 1.0 | +| missing_bounds.cpp:68:19:68:20 | AD | 1.0 | +| missing_bounds.cpp:68:19:68:20 | AD | 1.0 | +| missing_bounds.cpp:69:5:69:20 | ... & ... | 5.36870912E8 | +| missing_bounds.cpp:69:5:69:20 | ... -= ... | 5.36870912E8 | +| missing_bounds.cpp:69:5:69:20 | ... == ... | 1.0 | +| missing_bounds.cpp:69:5:69:21 | (...) | 5.36870912E8 | +| missing_bounds.cpp:69:5:69:21 | x | 5.36870912E8 | +| missing_bounds.cpp:69:5:69:21 | x | 5.36870912E8 | +| missing_bounds.cpp:69:19:69:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:69:19:69:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:69:19:69:20 | (unsigned int)... | 1.0 | +| missing_bounds.cpp:69:19:69:20 | AE | 1.0 | +| missing_bounds.cpp:69:19:69:20 | AE | 1.0 | +| missing_bounds.cpp:69:19:69:20 | AE | 1.0 | +| missing_bounds.cpp:72:12:72:12 | x | 1.073741824E9 | | test.c:6:14:6:15 | 0 | 1.0 | | test.c:8:5:8:9 | count | 1.0 | | test.c:8:5:8:19 | ... = ... | 13.0 | diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.ql b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.ql index efafcf6e684b..c39ab92ae710 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.ql +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.ql @@ -12,6 +12,9 @@ query predicate estimateNrOfBounds(Expr e, float nrOfBounds) { */ private predicate nonFunctionalNrOfBounds(Expr e) { strictcount(SimpleRangeAnalysisInternal::estimateNrOfBounds(e)) > 1 + or + e.getFile().getBaseName() = "missing_bounds.cpp" and + count(SimpleRangeAnalysisInternal::estimateNrOfBounds(e)) != 1 } module FunctionalityTest implements TestSig { diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected index dd7fc398f0ca..a483f2cba939 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected @@ -17,6 +17,67 @@ | minmax.c:26:37:26:37 | x | 1 | | minmax.c:26:40:26:40 | y | 2 | | minmax.c:26:43:26:43 | z | 1 | +| missing_bounds.cpp:40:5:40:20 | x | 4294967295 | +| missing_bounds.cpp:40:5:40:20 | x | 4294967295 | +| missing_bounds.cpp:41:5:41:20 | x | 4294967295 | +| missing_bounds.cpp:41:5:41:20 | x | 4294967295 | +| missing_bounds.cpp:42:5:42:20 | x | 4294967295 | +| missing_bounds.cpp:42:5:42:20 | x | 4294967295 | +| missing_bounds.cpp:43:5:43:20 | x | 4294967295 | +| missing_bounds.cpp:43:5:43:20 | x | 4294967295 | +| missing_bounds.cpp:44:5:44:20 | x | 4294967295 | +| missing_bounds.cpp:44:5:44:20 | x | 4294967295 | +| missing_bounds.cpp:45:5:45:20 | x | 4294967295 | +| missing_bounds.cpp:45:5:45:20 | x | 4294967295 | +| missing_bounds.cpp:46:5:46:20 | x | 4294967295 | +| missing_bounds.cpp:46:5:46:20 | x | 4294967295 | +| missing_bounds.cpp:47:5:47:20 | x | 4294967295 | +| missing_bounds.cpp:47:5:47:20 | x | 4294967295 | +| missing_bounds.cpp:48:5:48:20 | x | 4294967295 | +| missing_bounds.cpp:48:5:48:20 | x | 4294967295 | +| missing_bounds.cpp:49:5:49:20 | x | 4294967295 | +| missing_bounds.cpp:49:5:49:20 | x | 4294967295 | +| missing_bounds.cpp:50:5:50:20 | x | 4294967295 | +| missing_bounds.cpp:50:5:50:20 | x | 4294967295 | +| missing_bounds.cpp:51:5:51:20 | x | 4294967295 | +| missing_bounds.cpp:51:5:51:20 | x | 4294967295 | +| missing_bounds.cpp:52:5:52:20 | x | 4294967295 | +| missing_bounds.cpp:52:5:52:20 | x | 4294967295 | +| missing_bounds.cpp:53:5:53:20 | x | 4294967295 | +| missing_bounds.cpp:53:5:53:20 | x | 4294967295 | +| missing_bounds.cpp:54:5:54:20 | x | 4294967295 | +| missing_bounds.cpp:54:5:54:20 | x | 4294967295 | +| missing_bounds.cpp:55:5:55:20 | x | 4294967295 | +| missing_bounds.cpp:55:5:55:20 | x | 4294967295 | +| missing_bounds.cpp:56:5:56:20 | x | 4294967295 | +| missing_bounds.cpp:56:5:56:20 | x | 4294967295 | +| missing_bounds.cpp:57:5:57:20 | x | 4294967295 | +| missing_bounds.cpp:57:5:57:20 | x | 4294967295 | +| missing_bounds.cpp:58:5:58:20 | x | 4294967295 | +| missing_bounds.cpp:58:5:58:20 | x | 4294967295 | +| missing_bounds.cpp:59:5:59:20 | x | 4294967295 | +| missing_bounds.cpp:59:5:59:20 | x | 4294967295 | +| missing_bounds.cpp:60:5:60:20 | x | 4294967295 | +| missing_bounds.cpp:60:5:60:20 | x | 4294967295 | +| missing_bounds.cpp:61:5:61:20 | x | 4294967295 | +| missing_bounds.cpp:61:5:61:20 | x | 4294967295 | +| missing_bounds.cpp:62:5:62:20 | x | 4294967295 | +| missing_bounds.cpp:62:5:62:20 | x | 4294967295 | +| missing_bounds.cpp:63:5:63:20 | x | 4294967295 | +| missing_bounds.cpp:63:5:63:20 | x | 4294967295 | +| missing_bounds.cpp:64:5:64:20 | x | 4294967295 | +| missing_bounds.cpp:64:5:64:20 | x | 4294967295 | +| missing_bounds.cpp:65:5:65:21 | x | 4294967295 | +| missing_bounds.cpp:65:5:65:21 | x | 4294967295 | +| missing_bounds.cpp:66:5:66:21 | x | 4294967295 | +| missing_bounds.cpp:66:5:66:21 | x | 4294967295 | +| missing_bounds.cpp:67:5:67:21 | x | 4294967295 | +| missing_bounds.cpp:67:5:67:21 | x | 4294967295 | +| missing_bounds.cpp:68:5:68:21 | x | 4294967295 | +| missing_bounds.cpp:68:5:68:21 | x | 4294967295 | +| missing_bounds.cpp:69:5:69:21 | x | 4294967295 | +| missing_bounds.cpp:69:5:69:21 | x | 4294967295 | +| missing_bounds.cpp:72:12:72:12 | x | 4294967295 | | test.c:8:5:8:9 | count | 2147483647 | | test.c:8:13:8:17 | count | 2147483647 | | test.c:10:10:10:14 | count | 2147483647 |