• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -asan -asan-module -S | FileCheck %s
2target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
3target triple = "x86_64-unknown-linux-gnu"
4
5; Here we check that the global redzone sizes grow with the object size.
6
7@G10 = global [10 x i8] zeroinitializer, align 1
8; CHECK: @G10 = global { [10 x i8], [54 x i8] }
9
10@G31 = global [31 x i8] zeroinitializer, align 1
11@G32 = global [32 x i8] zeroinitializer, align 1
12@G33 = global [33 x i8] zeroinitializer, align 1
13; CHECK: @G31 = global { [31 x i8], [33 x i8] }
14; CHECK: @G32 = global { [32 x i8], [32 x i8] }
15; CHECK: @G33 = global { [33 x i8], [63 x i8] }
16
17@G63 = global [63 x i8] zeroinitializer, align 1
18@G64 = global [64 x i8] zeroinitializer, align 1
19@G65 = global [65 x i8] zeroinitializer, align 1
20; CHECK: @G63 = global { [63 x i8], [33 x i8] }
21; CHECK: @G64 = global { [64 x i8], [32 x i8] }
22; CHECK: @G65 = global { [65 x i8], [63 x i8] }
23
24@G127 = global [127 x i8] zeroinitializer, align 1
25@G128 = global [128 x i8] zeroinitializer, align 1
26@G129 = global [129 x i8] zeroinitializer, align 1
27; CHECK: @G127 = global { [127 x i8], [33 x i8] }
28; CHECK: @G128 = global { [128 x i8], [32 x i8] }
29; CHECK: @G129 = global { [129 x i8], [63 x i8] }
30
31@G255 = global [255 x i8] zeroinitializer, align 1
32@G256 = global [256 x i8] zeroinitializer, align 1
33@G257 = global [257 x i8] zeroinitializer, align 1
34; CHECK: @G255 = global { [255 x i8], [33 x i8] }
35; CHECK: @G256 = global { [256 x i8], [64 x i8] }
36; CHECK: @G257 = global { [257 x i8], [95 x i8] }
37
38@G511 = global [511 x i8] zeroinitializer, align 1
39@G512 = global [512 x i8] zeroinitializer, align 1
40@G513 = global [513 x i8] zeroinitializer, align 1
41; CHECK: @G511 = global { [511 x i8], [97 x i8] }
42; CHECK: @G512 = global { [512 x i8], [128 x i8] }
43; CHECK: @G513 = global { [513 x i8], [159 x i8] }
44
45@G1023 = global [1023 x i8] zeroinitializer, align 1
46@G1024 = global [1024 x i8] zeroinitializer, align 1
47@G1025 = global [1025 x i8] zeroinitializer, align 1
48; CHECK: @G1023 = global { [1023 x i8], [225 x i8] }
49; CHECK: @G1024 = global { [1024 x i8], [256 x i8] }
50; CHECK: @G1025 = global { [1025 x i8], [287 x i8] }
51
52@G1000000 = global [1000000 x i8] zeroinitializer, align 1
53@G10000000 = global [10000000 x i8] zeroinitializer, align 1
54@G100000000 = global [100000000 x i8] zeroinitializer, align 1
55; CHECK: @G1000000 = global { [1000000 x i8], [249984 x i8] }
56; CHECK: @G10000000 = global { [10000000 x i8], [262144 x i8] }
57; CHECK: @G100000000 = global { [100000000 x i8], [262144 x i8] }
58