CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
43 lines
1.7 KiB
C++
43 lines
1.7 KiB
C++
// RUN: %clangxx -fsanitize=integer -g0 %s -o %t
|
|
|
|
// Suppression by symbol name (unsigned-integer-overflow:do_overflow below)
|
|
// requires the compiler-rt runtime to be able to symbolize stack addresses.
|
|
// REQUIRES: can-symbolize
|
|
// UNSUPPORTED: android
|
|
// Output differs on OpenBSD longer by displaying the values.
|
|
// XFAIL: target={{.*openbsd.*}}
|
|
|
|
// Fails without any suppression.
|
|
// RUN: %env_ubsan_opts=halt_on_error=1 not %run %t 2>&1 | FileCheck %s
|
|
|
|
// RUN: echo "signed-integer-overflow:%t" > %t.wrong-supp
|
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.wrong-supp"' not %run %t 2>&1 | FileCheck %s
|
|
|
|
// RUN: echo "unsigned-integer-overflow:do_overflow" > %t.func-supp
|
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.func-supp"' %run %t
|
|
// FIXME: The '%t' substitution can't be used for the module name because it
|
|
// contains a colon, so we have to use the basename, which is
|
|
// suppressions.cpp.tmp.
|
|
// RUN: echo "unsigned-integer-overflow:suppressions.cpp.tmp" > %t.module-supp
|
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.module-supp"' %run %t
|
|
|
|
// Note: file-level suppressions should work even without debug info.
|
|
// RUN: echo "unsigned-integer-overflow:%s" > %t.file-supp
|
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.file-supp"' %run %t
|
|
|
|
// Suppressions don't work for unrecoverable kinds.
|
|
// RUN: %clangxx -fsanitize=integer -fno-sanitize-recover=integer %s -o %t-norecover
|
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.module-supp"' not %run %t-norecover 2>&1 | FileCheck %s
|
|
|
|
#include <stdint.h>
|
|
|
|
extern "C" void do_overflow() {
|
|
(void)(uint64_t(10000000000000000000ull) + uint64_t(9000000000000000000ull));
|
|
// CHECK: runtime error: unsigned integer overflow
|
|
}
|
|
|
|
int main() {
|
|
do_overflow();
|
|
return 0;
|
|
}
|