[lld] r363261 - [lld][ELF] Add tests for bad subsection length in .ARM.attributes
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 13 06:41:28 PDT 2019
Author: evgeny777
Date: Thu Jun 13 06:41:28 2019
New Revision: 363261
URL: http://llvm.org/viewvc/llvm-project?rev=363261&view=rev
Log:
[lld][ELF] Add tests for bad subsection length in .ARM.attributes
Differential revision: https://reviews.llvm.org/D63191
Added:
lld/trunk/test/ELF/invalid/bad-arm-attributes.s
lld/trunk/test/ELF/invalid/bad-arm-attributes2.s
Added: lld/trunk/test/ELF/invalid/bad-arm-attributes.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/bad-arm-attributes.s?rev=363261&view=auto
==============================================================================
--- lld/trunk/test/ELF/invalid/bad-arm-attributes.s (added)
+++ lld/trunk/test/ELF/invalid/bad-arm-attributes.s Thu Jun 13 06:41:28 2019
@@ -0,0 +1,8 @@
+# REQUIRES: arm
+# RUN: llvm-mc -filetype=obj -triple=arm-unknown-linux %s -o %t
+# RUN: ld.lld %t -o /dev/null 2>&1 | FileCheck %s
+
+# CHECK: invalid subsection length 0 at offset 1
+
+.section .ARM.attributes,"a",%0x70000003
+ .quad 0
Added: lld/trunk/test/ELF/invalid/bad-arm-attributes2.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/bad-arm-attributes2.s?rev=363261&view=auto
==============================================================================
--- lld/trunk/test/ELF/invalid/bad-arm-attributes2.s (added)
+++ lld/trunk/test/ELF/invalid/bad-arm-attributes2.s Thu Jun 13 06:41:28 2019
@@ -0,0 +1,8 @@
+# REQUIRES: arm
+# RUN: llvm-mc -filetype=obj -triple=arm-unknown-linux %s -o %t
+# RUN: ld.lld %t -o /dev/null 2>&1 | FileCheck %s
+
+# CHECK: invalid subsection length 4294967295 at offset 1
+
+.section .ARM.attributes,"a",%0x70000003
+ .byte 0, 0xFF, 0xFF, 0xFF, 0xFF
More information about the llvm-commits
mailing list