File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ namespace traits{
56
56
void check_index (R_xlen_t i) const {
57
57
#ifndef RCPP_NO_BOUNDS_CHECK
58
58
if (i >= size) {
59
- stop (" subscript out of bounds (index %s >= vector size %s)" , i, size);
59
+ warning (" subscript out of bounds (index %s >= vector size %s)" , i, size);
60
60
}
61
61
#endif
62
62
}
@@ -94,7 +94,7 @@ namespace traits{
94
94
void check_index (R_xlen_t i) const {
95
95
#ifndef RCPP_NO_BOUNDS_CHECK
96
96
if (i >= p->size ()) {
97
- stop (" subscript out of bounds (index %s >= vector size %s)" , i, p->size ());
97
+ warning (" subscript out of bounds (index %s >= vector size %s)" , i, p->size ());
98
98
}
99
99
#endif
100
100
}
Original file line number Diff line number Diff line change @@ -696,8 +696,9 @@ expect_true( !CharacterVector_test_equality("foo", "bar") )
696
696
expect_true( ! CharacterVector_test_equality_crosspolicy(" foo" , " bar" ) )
697
697
698
698
# https://github.com/RcppCore/Rcpp/issues/1308
699
- expect_error(NumericVector_test_out_of_bounds_read(numeric (0 ), 0 ))
700
- expect_error(NumericVector_test_out_of_bounds_read(numeric (1 ), 1 ))
701
- expect_error(CharacterVector_test_out_of_bounds_read(character (0 ), 0 ))
702
- expect_error(CharacterVector_test_out_of_bounds_read(character (1 ), 1 ))
699
+ # tests disabled since these could trigger UBSAN warnings / crashes
700
+ # expect_warning(NumericVector_test_out_of_bounds_read(numeric(0), 0))
701
+ # expect_warning(NumericVector_test_out_of_bounds_read(numeric(1), 1))
702
+ # expect_warning(CharacterVector_test_out_of_bounds_read(character(0), 0))
703
+ # expect_warning(CharacterVector_test_out_of_bounds_read(character(1), 1))
703
704
You can’t perform that action at this time.
0 commit comments