1## Test that errors in loading an exe doesn't crash lldb.
2## The ExportTable RelativeVirtualAddress is out of bounds here.
3
4# RUN: yaml2obj %s -o %t.exe
5# RUN: %lldb %t.exe 2>&1 | FileCheck %s
6
7# CHECK: error: '{{.*}}' doesn't contain any {{.*}} platform architectures
8--- !COFF
9OptionalHeader:
10  AddressOfEntryPoint: 4096
11  ImageBase:       1073741824
12  SectionAlignment: 4096
13  FileAlignment:   512
14  MajorOperatingSystemVersion: 6
15  MinorOperatingSystemVersion: 0
16  MajorImageVersion: 0
17  MinorImageVersion: 0
18  MajorSubsystemVersion: 6
19  MinorSubsystemVersion: 0
20  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
21  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
22  SizeOfStackReserve: 1048576
23  SizeOfStackCommit: 4096
24  SizeOfHeapReserve: 1048576
25  SizeOfHeapCommit: 4096
26  ExportTable:
27    RelativeVirtualAddress: 12345678
28    Size:            100
29  ImportTable:
30    RelativeVirtualAddress: 0
31    Size:            0
32  ResourceTable:
33    RelativeVirtualAddress: 0
34    Size:            0
35  ExceptionTable:
36    RelativeVirtualAddress: 0
37    Size:            0
38  CertificateTable:
39    RelativeVirtualAddress: 0
40    Size:            0
41  BaseRelocationTable:
42    RelativeVirtualAddress: 0
43    Size:            0
44  Debug:
45    RelativeVirtualAddress: 0
46    Size:            0
47  Architecture:
48    RelativeVirtualAddress: 0
49    Size:            0
50  GlobalPtr:
51    RelativeVirtualAddress: 0
52    Size:            0
53  TlsTable:
54    RelativeVirtualAddress: 0
55    Size:            0
56  LoadConfigTable:
57    RelativeVirtualAddress: 0
58    Size:            0
59  BoundImport:
60    RelativeVirtualAddress: 0
61    Size:            0
62  IAT:
63    RelativeVirtualAddress: 0
64    Size:            0
65  DelayImportDescriptor:
66    RelativeVirtualAddress: 0
67    Size:            0
68  ClrRuntimeHeader:
69    RelativeVirtualAddress: 0
70    Size:            0
71header:
72  Machine:         IMAGE_FILE_MACHINE_AMD64
73  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
74sections:
75  - Name:            .text
76    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
77    VirtualAddress:  4096
78    VirtualSize:     1
79    SectionData:     C3
80symbols:         []
81...
82