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
50 lines
2.4 KiB
C
50 lines
2.4 KiB
C
// On x86_64, the kernel does not provide the faulting address for dereferences
|
|
// of addresses greater than the 48-bit hardware addressable range, i.e.,
|
|
// `siginfo.si_addr` is zero in ASan's SEGV signal handler. This test checks
|
|
// that ASan does not misrepresent such cases as "NULL dereferences".
|
|
|
|
// REQUIRES: x86_64-target-arch
|
|
// RUN: %clang_asan %s -o %t
|
|
// RUN: %env_asan_opts=print_scariness=1 not %run %t 0x0000000000000000 2>&1 | FileCheck %s --check-prefixes=ZERO,HINT-PAGE0
|
|
// RUN: %env_asan_opts=print_scariness=1 not %run %t 0x0000000000000FFF 2>&1 | FileCheck %s --check-prefixes=LOW1,HINT-PAGE0
|
|
// RUN: %env_asan_opts=print_scariness=1 not %run %t 0x0000000000001000 2>&1 | FileCheck %s --check-prefixes=LOW2,HINT-NONE
|
|
// RUN: %env_asan_opts=print_scariness=1 not %run %t 0x4141414141414141 2>&1 | FileCheck %s --check-prefixes=HIGH,HINT-HIGHADDR
|
|
// RUN: %env_asan_opts=print_scariness=1 not %run %t 0xFFFFFFFFFFFFFFFF 2>&1 | FileCheck %s --check-prefixes=MAX,HINT-HIGHADDR
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(int argc, const char *argv[]) {
|
|
const char *hex = argv[1];
|
|
uint64_t *addr = (uint64_t *)strtoull(hex, NULL, 16);
|
|
uint64_t x = *addr; // segmentation fault
|
|
return x;
|
|
}
|
|
|
|
// ZERO: SEGV on unknown address 0x000000000000 (pc
|
|
// LOW1: SEGV on unknown address 0x000000000fff (pc
|
|
// LOW2: SEGV on unknown address 0x000000001000 (pc
|
|
// HIGH: {{BUS|SEGV}} on unknown address (pc
|
|
// MAX: {{BUS|SEGV}} on unknown address (pc
|
|
|
|
// HINT-PAGE0-NOT: HINT: this fault was caused by a dereference of a high value address
|
|
// HINT-PAGE0: HINT: address points to the zero page.
|
|
|
|
// HINT-NONE-NOT: HINT: this fault was caused by a dereference of a high value address
|
|
// HINT-NONE-NOT: HINT: address points to the zero page.
|
|
|
|
// HINT-HIGHADDR: HINT: this fault was caused by a dereference of a high value address
|
|
// HINT-HIGHADDR-NOT: HINT: address points to the zero page.
|
|
|
|
// ZERO: SCARINESS: 10 (null-deref)
|
|
// LOW1: SCARINESS: 10 (null-deref)
|
|
// LOW2: SCARINESS: 20 (wild-addr-read)
|
|
// HIGH: SCARINESS: {{(20 \(wild-addr-read\))|(60 \(wild-jump\))}}
|
|
// MAX: SCARINESS: {{(20 \(wild-addr-read\))|(60 \(wild-jump\))}}
|
|
|
|
// TODO: Currently, register values are only printed on Mac. Once this changes,
|
|
// remove the 'TODO_' prefix in the following lines.
|
|
// TODO_HIGH,TODO_MAX: Register values:
|
|
// TODO_HIGH: = 0x4141414141414141
|
|
// TODO_MAX: = 0xffffffffffffffff
|