We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7e27cb2 + 0c8aedd commit ca8c1a9Copy full SHA for ca8c1a9
regression/cbmc/pointer-overflow2/main.c
@@ -0,0 +1,10 @@
1
+#include <stdlib.h>
2
+
3
+void main()
4
+{
5
+ char *p = (char *)10;
6
+ p -= 1;
7
+ p += 1;
8
+ p += -1; // spurious pointer overflow report
9
+ p -= -1; // spurious pointer overflow report
10
+}
regression/cbmc/pointer-overflow2/test.desc
@@ -0,0 +1,11 @@
+KNOWNBUG
+main.c
+--pointer-overflow-check
+^EXIT=0$
+^SIGNAL=0$
+\[main.overflow.1\] line \d+ pointer arithmetic overflow on - in p - \(signed long int\)1: SUCCESS
+\[main.overflow.2\] line \d+ pointer arithmetic overflow on \+ in p \+ \(signed long int\)1: SUCCESS
+\[main.overflow.3\] line \d+ pointer arithmetic overflow on \+ in p \+ \(signed long int\)-1: SUCCESS
+\[main.overflow.4\] line \d+ pointer arithmetic overflow on - in p - \(signed long int\)-1: SUCCESS
+--
11
+^warning: ignoring
0 commit comments