1// RUN: %clang_asan -O0 %s -o %t
2// RUN: %env_asan_opts=verbosity=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64-V0
3// RUN: %env_asan_opts=verbosity=2 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64
4// REQUIRES: powerpc64-target-arch
5
6#include <stdio.h>
7
8int main() {
9// CHECK-PPC64: || `[{{0x200|0x180|0x0a0|0x040}}000000000, {{0x7ff|0x3ff|0x0ff}}fffffffff]` || HighMem ||
10// CHECK-PPC64: || `[{{0x140|0x130|0x034|0x028}}000000000, {{0x1ff|0x17f|0x09f|0x03f}}fffffffff]` || HighShadow ||
11// CHECK-PPC64: || `[{{0x120|0x024|0x024}}000000000, {{0x12f|0x13f|0x033|0x027}}fffffffff]` || ShadowGap ||
12// CHECK-PPC64: || `[{{0x100|0x020}}000000000, {{0x11f|0x023}}fffffffff]` || LowShadow ||
13// CHECK-PPC64: || `[0x000000000000, {{0x0ff|0x01f}}fffffffff]` || LowMem ||
14//
15 printf(format: "ppc64 eyecatcher \n");
16// CHECK-PPC64-V0: ppc64 eyecatcher
17
18 return 0;
19}
20
21/*
22 * Several different signatures noted.
23
24Newer kernel: (Fedora starting with kernel version 4.?)
25|| `[0x200000000000, 0x7fffffffffff]` || HighMem ||
26|| `[0x140000000000, 0x1fffffffffff]` || HighShadow ||
27|| `[0x120000000000, 0x13ffffffffff]` || ShadowGap ||
28|| `[0x100000000000, 0x11ffffffffff]` || LowShadow ||
29|| `[0x000000000000, 0x0fffffffffff]` || LowMem ||
30
31Newer kernel: (Ubuntu starting with kernel version 4.?)
32|| `[0x180000000000, 0x3fffffffffff]` || HighMem ||
33|| `[0x130000000000, 0x17ffffffffff]` || HighShadow ||
34|| `[0x120000000000, 0x12ffffffffff]` || ShadowGap ||
35|| `[0x100000000000, 0x11ffffffffff]` || LowShadow ||
36|| `[0x000000000000, 0x0fffffffffff]` || LowMem ||
37
38Newish kernel: (64TB address range support, starting with kernel version 3.7)
39|| `[0x0a0000000000, 0x3fffffffffff]` || HighMem ||
40|| `[0x034000000000, 0x09ffffffffff]` || HighShadow ||
41|| `[0x024000000000, 0x033fffffffff]` || ShadowGap ||
42|| `[0x020000000000, 0x023fffffffff]` || LowShadow ||
43|| `[0x000000000000, 0x01ffffffffff]` || LowMem ||
44
45Oldish kernel:
46|| `[0x040000000000, 0x0fffffffffff]` || HighMem ||
47|| `[0x028000000000, 0x03ffffffffff]` || HighShadow ||
48|| `[0x024000000000, 0x027fffffffff]` || ShadowGap ||
49|| `[0x020000000000, 0x023fffffffff]` || LowShadow ||
50|| `[0x000000000000, 0x01ffffffffff]` || LowMem ||
51*/
52
53

source code of compiler-rt/test/asan/TestCases/debug_ppc64_mapping.cpp