[lld] r335819 - [ELF] - Add test case to cover "unexpected end of CIE" error.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 28 02:34:59 PDT 2018


Author: grimar
Date: Thu Jun 28 02:34:59 2018
New Revision: 335819

URL: http://llvm.org/viewvc/llvm-project?rev=335819&view=rev
Log:
[ELF] - Add test case to cover "unexpected end of CIE" error.

It was uncovered by our test cases.

Added:
    lld/trunk/test/ELF/invalid-eh-frame.s

Added: lld/trunk/test/ELF/invalid-eh-frame.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid-eh-frame.s?rev=335819&view=auto
==============================================================================
--- lld/trunk/test/ELF/invalid-eh-frame.s (added)
+++ lld/trunk/test/ELF/invalid-eh-frame.s Thu Jun 28 02:34:59 2018
@@ -0,0 +1,17 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
+# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+
+# CHECK:      error: corrupted .eh_frame: unexpected end of CIE
+# CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0x8)
+
+.section .eh_frame
+  .byte 0x04
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00




More information about the llvm-commits mailing list