Skip to content

Commit 8359aff

Browse files
committed
array-bounds checks are now fatal
Accessing an array out of bounds is undefined behavior, and hence, the assertions for this need to be fatal.
1 parent 621fe05 commit 8359aff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/ansi-c/goto-conversion/goto_check_c.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ void goto_check_ct::bounds_check_index(
16281628
inequality,
16291629
name + " lower bound",
16301630
"array bounds",
1631-
false, // fatal
1631+
true, // fatal
16321632
expr.find_source_location(),
16331633
expr,
16341634
guard);
@@ -1708,7 +1708,7 @@ void goto_check_ct::bounds_check_index(
17081708
inequality,
17091709
name + " upper bound",
17101710
"array bounds",
1711-
false, // fatal
1711+
true, // fatal
17121712
expr.find_source_location(),
17131713
expr,
17141714
guard);
@@ -1722,7 +1722,7 @@ void goto_check_ct::bounds_check_index(
17221722
inequality,
17231723
name + " upper bound",
17241724
"array bounds",
1725-
false, // fatal
1725+
true, // fatal
17261726
expr.find_source_location(),
17271727
expr,
17281728
guard);

0 commit comments

Comments
 (0)