1// REQUIRES: aarch64-registered-target
2// RUN: llvm-mc -filetype=obj -triple aarch64-windows %s -o - \
3// RUN:   | not --crash llvm-readobj --unwind - 2>&1 | FileCheck %s
4
5// Older versions of LLVM had a bug where we would accidentally
6// truncate the number of epilogue scopes to a uint8_t; make
7// sure this doesn't happen.
8//
9// We expect the llvm-readobj invocation to fail because the
10// xdata section is truncated (to reduce the size of the testcase).
11
12// CHECK: EpilogueScopes: 256
13
14.section .pdata,"dr"
15        .long "?func@@YAHXZ"@IMGREL
16        .long "$unwind$func@@YAHXZ"@IMGREL
17
18        .text
19        .globl  "?func@@YAHXZ"
20        .p2align        3
21"?func@@YAHXZ":
22        ret
23
24.section        .xdata,"dr"
25"$unwind$func@@YAHXZ":
26.long 0x00000000, 0x02010100, 0x09000000, 0x0A000000
27