mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 03:17:51 +00:00
Plug a leak in the arm disassembler and put the tests back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128238 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
505f3cd296
commit
83ccbff84f
@ -18,6 +18,7 @@
|
||||
#include "ARMDisassembler.h"
|
||||
#include "ARMDisassemblerCore.h"
|
||||
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
#include "llvm/MC/EDInstInfo.h"
|
||||
#include "llvm/MC/MCInst.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
@ -384,15 +385,13 @@ bool ARMDisassembler::getInstruction(MCInst &MI,
|
||||
showBitVector(errs(), insn);
|
||||
});
|
||||
|
||||
ARMBasicMCBuilder *Builder = CreateMCBuilder(Opcode, Format);
|
||||
OwningPtr<ARMBasicMCBuilder> Builder(CreateMCBuilder(Opcode, Format));
|
||||
if (!Builder)
|
||||
return false;
|
||||
|
||||
if (!Builder->Build(MI, insn))
|
||||
return false;
|
||||
|
||||
delete Builder;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
4
test/MC/Disassembler/ARM/invalid-CPS3p-arm.txt
Normal file
4
test/MC/Disassembler/ARM/invalid-CPS3p-arm.txt
Normal file
@ -0,0 +1,4 @@
|
||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||
|
||||
# invalid (imod, M, iflags) combination
|
||||
0x93 0x1c 0x02 0xf1
|
4
test/MC/Disassembler/ARM/invalid-VLDMSDB-arm.txt
Normal file
4
test/MC/Disassembler/ARM/invalid-VLDMSDB-arm.txt
Normal file
@ -0,0 +1,4 @@
|
||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||
|
||||
# core registers out of range
|
||||
0xa5 0xba 0x52 0xed
|
Loading…
x
Reference in New Issue
Block a user