aboutsummaryrefslogtreecommitdiff
path: root/test/fuzzer/fuzzer-ubsan.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/fuzzer/fuzzer-ubsan.test')
-rw-r--r--test/fuzzer/fuzzer-ubsan.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/fuzzer/fuzzer-ubsan.test b/test/fuzzer/fuzzer-ubsan.test
new file mode 100644
index 000000000000..49c190cd034b
--- /dev/null
+++ b/test/fuzzer/fuzzer-ubsan.test
@@ -0,0 +1,5 @@
+RUN: %cpp_compiler -fsanitize=undefined -fno-sanitize-recover=all %S/SignedIntOverflowTest.cpp -o %t-SignedIntOverflowTest-Ubsan
+RUN: not %t-SignedIntOverflowTest-Ubsan 2>&1 | FileCheck %s
+CHECK: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
+CHECK: Test unit written to ./crash-
+