From: Simon Dardis Date: Fri, 24 Feb 2017 10:51:27 +0000 (+0000) Subject: [mips][mc] Fix a crash when disassembling odd sized sections X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbda2aa80bc981f8ac189e07a63d01d1768bd012;p=llvm [mips][mc] Fix a crash when disassembling odd sized sections Corresponding test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296106 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/tools/llvm-objdump/Mips/disassemble-all.test b/test/tools/llvm-objdump/Mips/disassemble-all.test new file mode 100644 index 00000000000..4554a0e030a --- /dev/null +++ b/test/tools/llvm-objdump/Mips/disassemble-all.test @@ -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