From 285606027b2e6110d9c1bdd4beccad35fd1c962e Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 31 Mar 2014 07:59:33 +0000 Subject: [PATCH] Try to fix MSan bootstrap bot: make ARM64Disassembler::getInstruction() always initialize Size argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205171 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp b/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp index 800eaae27e6..1af8b2f498c 100644 --- a/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp +++ b/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp @@ -195,9 +195,11 @@ DecodeStatus ARM64Disassembler::getInstruction(MCInst &MI, uint64_t &Size, uint8_t bytes[4]; + Size = 0; // We want to read exactly 4 bytes of data. if (Region.readBytes(Address, 4, (uint8_t *)bytes) == -1) return Fail; + Size = 4; // Encoded as a small-endian 32-bit word in the stream. uint32_t insn = @@ -209,8 +211,6 @@ DecodeStatus ARM64Disassembler::getInstruction(MCInst &MI, uint64_t &Size, if (!result) return Fail; - Size = 4; - return Success; } -- 2.11.0