• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test that alloca instrumentation with old API levels does not use short granules.
2;
3; RUN: opt < %s -hwasan -S | FileCheck %s
4
5target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
6target triple = "aarch64--linux-android"
7
8declare void @use32(i32*)
9
10define void @test_alloca() sanitize_hwaddress {
11; CHECK-LABEL: @test_alloca(
12; CHECK: %[[X_TAG:[^ ]*]] = trunc i64 {{.*}} to i8
13; CHECK: call void @llvm.memset.p0i8.i64(i8* align 1 {{.*}}, i8 %[[X_TAG]], i64 1, i1 false)
14  %x = alloca i32, align 4
15  call void @use32(i32* nonnull %x)
16  ret void
17}
18