]> granicus.if.org Git - llvm/commitdiff
[mips][mc] Fix a crash when disassembling odd sized sections
authorSimon Dardis <simon.dardis@imgtec.com>
Fri, 24 Feb 2017 10:51:27 +0000 (10:51 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Fri, 24 Feb 2017 10:51:27 +0000 (10:51 +0000)
Corresponding test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296106 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/llvm-objdump/Mips/disassemble-all.test [new file with mode: 0644]

diff --git a/test/tools/llvm-objdump/Mips/disassemble-all.test b/test/tools/llvm-objdump/Mips/disassemble-all.test
new file mode 100644 (file)
index 0000000..4554a0e
--- /dev/null
@@ -0,0 +1,16 @@
+# RUN: yaml2obj %s | llvm-objdump -D -
+
+# Test that -D does not crash llvm-objdump encounters a section who size is a
+# not a multiple of the size of an instruction.
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_MIPS
+Sections:
+  - Name:            .note.llvm.crash
+    Type:            SHT_NOTE
+    Address:         0x0
+    Content:         002E746578