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
59 lines
2.7 KiB
LLVM
59 lines
2.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals all --version 5
|
|
; This test checks in the second run, function is not instrumented again.
|
|
; RUN: opt < %s -passes=asan,asan -S | FileCheck %s
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
; Function with sanitize_address is instrumented.
|
|
; Function Attrs: nounwind uwtable
|
|
;.
|
|
; CHECK: @llvm.used = appending global [1 x ptr] [ptr @asan.module_ctor], section "llvm.metadata"
|
|
; CHECK: @___asan_globals_registered = common hidden global i64 0
|
|
; CHECK: @__start_asan_globals = extern_weak hidden global i64
|
|
; CHECK: @__stop_asan_globals = extern_weak hidden global i64
|
|
; CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 1, ptr @asan.module_ctor, ptr @asan.module_ctor }]
|
|
;.
|
|
define void @instr_sa(ptr %a) sanitize_address {
|
|
; CHECK: Function Attrs: sanitize_address
|
|
; CHECK-LABEL: define void @instr_sa(
|
|
; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[TMP0:%.*]] = ptrtoint ptr [[A]] to i64
|
|
; CHECK-NEXT: [[TMP1:%.*]] = lshr i64 [[TMP0]], 3
|
|
; CHECK-NEXT: [[TMP2:%.*]] = add i64 [[TMP1]], 2147450880
|
|
; CHECK-NEXT: [[TMP3:%.*]] = inttoptr i64 [[TMP2]] to ptr
|
|
; CHECK-NEXT: [[TMP4:%.*]] = load i8, ptr [[TMP3]], align 1
|
|
; CHECK-NEXT: [[TMP5:%.*]] = icmp ne i8 [[TMP4]], 0
|
|
; CHECK-NEXT: br i1 [[TMP5]], label %[[BB6:.*]], label %[[BB12:.*]], !prof [[PROF1:![0-9]+]]
|
|
; CHECK: [[BB6]]:
|
|
; CHECK-NEXT: [[TMP7:%.*]] = and i64 [[TMP0]], 7
|
|
; CHECK-NEXT: [[TMP8:%.*]] = add i64 [[TMP7]], 3
|
|
; CHECK-NEXT: [[TMP9:%.*]] = trunc i64 [[TMP8]] to i8
|
|
; CHECK-NEXT: [[TMP10:%.*]] = icmp sge i8 [[TMP9]], [[TMP4]]
|
|
; CHECK-NEXT: br i1 [[TMP10]], label %[[BB11:.*]], label %[[BB12]]
|
|
; CHECK: [[BB11]]:
|
|
; CHECK-NEXT: call void @__asan_report_load4(i64 [[TMP0]]) #[[ATTR3:[0-9]+]]
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK: [[BB12]]:
|
|
; CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[A]], align 4
|
|
; CHECK-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
|
|
; CHECK-NEXT: store i32 [[TMP2]], ptr [[A]], align 4
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
entry:
|
|
%tmp1 = load i32, ptr %a, align 4
|
|
%tmp2 = add i32 %tmp1, 1
|
|
store i32 %tmp2, ptr %a, align 4
|
|
ret void
|
|
}
|
|
;.
|
|
; CHECK: attributes #[[ATTR0]] = { sanitize_address }
|
|
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
|
|
; CHECK: attributes #[[ATTR2:[0-9]+]] = { nounwind }
|
|
; CHECK: attributes #[[ATTR3]] = { nomerge }
|
|
;.
|
|
; CHECK: [[META0:![0-9]+]] = !{i32 4, !"nosanitize_address", i32 1}
|
|
; CHECK: [[PROF1]] = !{!"branch_weights", i32 1, i32 1048575}
|
|
;.
|