1 | // RUN: %clangxx -fsanitize=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s |
---|---|
2 | // RUN: %clangxx -fsanitize=unsigned-integer-overflow -fno-sanitize-recover=all %s -o %t && not --crash %run %t 2>&1 | FileCheck %s |
3 | |
4 | #include <stdint.h> |
5 | |
6 | int main() { |
7 | uint32_t k = 0x87654321; |
8 | k += 0xedcba987; |
9 | // CHECK: add-overflow by 0x{{[[:xdigit:]]+$}} |
10 | } |
11 |