File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
regression/cbmc/pointer-overflow2 Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 1+ KNOWNBUG
2+ main.c
3+ --pointer-overflow-check
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ \[main.overflow.1\] line \d+ pointer arithmetic overflow on - in p - \(signed long int\)1: SUCCESS
7+ \[main.overflow.2\] line \d+ pointer arithmetic overflow on \+ in p \+ \(signed long int\)1: SUCCESS
8+ \[main.overflow.3\] line \d+ pointer arithmetic overflow on \+ in p \+ \(signed long int\)-1: SUCCESS
9+ \[main.overflow.4\] line \d+ pointer arithmetic overflow on - in p - \(signed long int\)-1: SUCCESS
10+ --
11+ ^warning: ignoring
You can’t perform that action at this time.
0 commit comments