llvm-project/llvm/test/DebugInfo/X86/eh-frame-invalid-version-zero.s
Georgii Rymar 66fb3c39cb [DebugInfo/DWARF] - Report .eh_frame sections of version != 1.
Specification (https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html#AEN1349)
says that the value of Version field for .eh_frame should be 1.

Though we accept other values and might perform an attempt to read
it as a .debug_frame because of that, what is wrong.

This patch adds a version check.

Differential revision: https://reviews.llvm.org/D81469
2020-06-16 15:46:26 +03:00

14 lines
379 B
ArmAsm

## Check we do not support .eh_frame sections of version 0.
# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t
# RUN: not llvm-dwarfdump -debug-frame %t 2>&1 | FileCheck %s
# CHECK: unsupported CIE version: 0
.section .eh_frame,"a",@unwind
.long .Lend - .LCIEptr ## Length
.LCIEptr:
.long 0x00000000 ## CIE ID
.byte 0 ## Version
.Lend: