[lld] r335824 - [ELF] - Add test case to cover "corrupted CIE (failed to read string)"

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


Author: grimar
Date: Thu Jun 28 03:10:02 2018
New Revision: 335824

URL: http://llvm.org/viewvc/llvm-project?rev=335824&view=rev
Log:
[ELF] - Add test case to cover "corrupted CIE (failed to read string)"

It was uncovered by our test cases.

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

Added: lld/trunk/test/ELF/invalid-eh-frame2.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid-eh-frame2.s?rev=335824&view=auto
==============================================================================
--- lld/trunk/test/ELF/invalid-eh-frame2.s (added)
+++ lld/trunk/test/ELF/invalid-eh-frame2.s Thu Jun 28 03:10:02 2018
@@ -0,0 +1,23 @@
+# 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: corrupted CIE (failed to read string)
+# CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0x9)
+
+.section .eh_frame
+.align 1
+  .byte 0x08
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x01
+  .byte 0x01
+  .byte 0x01
+  .byte 0x01
+ 
\ No newline at end of file




More information about the llvm-commits mailing list