File tree Expand file tree Collapse file tree 4 files changed +11
-25
lines changed Expand file tree Collapse file tree 4 files changed +11
-25
lines changed Original file line number Diff line number Diff line change 11CORE
22main.c
3- --signed-overflow-check --unsigned-overflow-check
3+ --signed-overflow-check --unsigned-overflow-check --pointer-overflow-check --pointer-check --bounds-check
44^EXIT=0$
55^SIGNAL=0$
66^VERIFICATION SUCCESSFUL$
Original file line number Diff line number Diff line change 33--pointer-overflow-check --unsigned-overflow-check
44^EXIT=10$
55^SIGNAL=0$
6- ^\[main\.overflow \.\d+\] line 8 ( pointer )? arithmetic overflow on .*: FAILURE
7- ^\[main\.overflow \.\d+\] line 9 ( pointer )? arithmetic overflow on .*: FAILURE
6+ ^\[main\.pointer_arithmetic \.\d+\] line 8 pointer arithmetic: pointer outside dynamic object bounds in .*: FAILURE
7+ ^\[main\.pointer_arithmetic \.\d+\] line 9 pointer arithmetic: pointer outside dynamic object bounds in .*: FAILURE
88^\[main\.overflow\.\d+\] line 10 (pointer )?arithmetic overflow on .*: FAILURE
9- ^\[main\.overflow\.\d+\] line 11 (pointer )?arithmetic overflow on .*: FAILURE
10- ^\[main\.overflow\.\d+\] line 12 (pointer )?arithmetic overflow on .*: FAILURE
9+ ^\[main\.pointer_arithmetic\.\d+\] line 10 pointer arithmetic: pointer outside dynamic object bounds in .*: FAILURE
10+ ^\[main\.pointer_arithmetic\.\d+\] line 11 pointer arithmetic: pointer outside dynamic object bounds in .*: FAILURE
11+ ^\[main\.pointer_arithmetic\.\d+\] line 12 pointer arithmetic: pointer outside dynamic object bounds in .*: FAILURE
1112^VERIFICATION FAILED$
1213--
1314^\[main\.overflow\.\d+\] line 1[45] (pointer )?arithmetic overflow on .*sizeof\(signed int\) .* : FAILURE
15+ ^\[main\.overflow\.\d+\] line 1[45] pointer arithmetic: pointer outside dynamic object bounds in .*: FAILURE
1416^warning: ignoring
Original file line number Diff line number Diff line change 33--pointer-overflow-check
44^EXIT=0$
55^SIGNAL=0$
6- \[main.overflow .1\] line \d+ pointer arithmetic overflow on - in p - \(signed long (long )?int\)1: SUCCESS
7- \[main.overflow .2\] line \d+ pointer arithmetic overflow on \+ in p \+ \(signed long (long )?int\)1: SUCCESS
8- \[main.overflow .3\] line \d+ pointer arithmetic overflow on \+ in p \+ \(signed long (long )?int\)-1: SUCCESS
9- \[main.overflow .4\] line \d+ pointer arithmetic overflow on - in p - \(signed long (long )?int\)-1: SUCCESS
6+ \[main.pointer_arithmetic .1\] line \d+ pointer arithmetic: invalid integer address in p - \(signed long (long )?int\)1: SUCCESS
7+ \[main.pointer_arithmetic .2\] line \d+ pointer arithmetic: invalid integer address in p \+ \(signed long (long )?int\)1: SUCCESS
8+ \[main.pointer_arithmetic .3\] line \d+ pointer arithmetic: invalid integer address in p \+ \(signed long (long )?int\)-1: SUCCESS
9+ \[main.pointer_arithmetic .4\] line \d+ pointer arithmetic: invalid integer address in p - \(signed long (long )?int\)-1: SUCCESS
1010--
1111^warning: ignoring
Original file line number Diff line number Diff line change @@ -1177,22 +1177,6 @@ void goto_checkt::pointer_overflow_check(
11771177 expr.operands ().size () == 2 ,
11781178 " pointer arithmetic expected to have exactly 2 operands" );
11791179
1180- // check for address space overflow by checking for overflow on integers
1181- exprt overflow (" overflow-" + expr.id_string (), bool_typet ());
1182- for (const auto &op : expr.operands ())
1183- {
1184- overflow.add_to_operands (
1185- typecast_exprt::conditional_cast (op, pointer_diff_type ()));
1186- }
1187-
1188- add_guarded_property (
1189- not_exprt (overflow),
1190- " pointer arithmetic overflow on " + expr.id_string (),
1191- " overflow" ,
1192- expr.find_source_location (),
1193- expr,
1194- guard);
1195-
11961180 // the result must be within object bounds or one past the end
11971181 const auto size = from_integer (0 , size_type ());
11981182 auto conditions = get_pointer_dereferenceable_conditions (expr, size);
You can’t perform that action at this time.
0 commit comments