]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/fuzzer/fuzzer-implicit-unsigned-integer-truncation.test
Vendor import of compiler-rt trunk r351319 (just before the release_80
[FreeBSD/FreeBSD.git] / test / fuzzer / fuzzer-implicit-unsigned-integer-truncation.test
1 RUN: rm -f %t-ImplicitUnsignedIntegerTruncationTest-Ubsan
2 RUN: %cpp_compiler -fsanitize=implicit-unsigned-integer-truncation -fno-sanitize-recover=all %S/ImplicitUnsignedIntegerTruncationTest.cpp -o %t-ImplicitUnsignedIntegerTruncationTest-Ubsan
3 RUN: not %run %t-ImplicitUnsignedIntegerTruncationTest-Ubsan 2>&1 | FileCheck %s
4 CHECK: ImplicitUnsignedIntegerTruncationTest.cpp:22:17: runtime error: implicit conversion from type 'unsigned int' of value 256 (32-bit, unsigned) to type 'uint8_t' (aka 'unsigned char') changed the value to 0 (8-bit, unsigned)
5 CHECK: Test unit written to ./crash-