[llvm] r353499 - [WebAssembly] Fix parseImmediate's memory alignment requirement
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 7 20:06:57 PST 2019
Author: aheejin
Date: Thu Feb 7 20:06:56 2019
New Revision: 353499
URL: http://llvm.org/viewvc/llvm-project?rev=353499&view=rev
Log:
[WebAssembly] Fix parseImmediate's memory alignment requirement
This fixes the current failure in the x86-64 ubsan bot caused by
r353496.
Modified:
llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp?rev=353499&r1=353498&r2=353499&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp Thu Feb 7 20:06:56 2019
@@ -108,7 +108,7 @@ template <typename T>
bool parseImmediate(MCInst &MI, uint64_t &Size, ArrayRef<uint8_t> Bytes) {
if (Size + sizeof(T) > Bytes.size())
return false;
- T Val = support::endian::read<T, support::endianness::little, alignof(T)>(
+ T Val = support::endian::read<T, support::endianness::little, 1>(
Bytes.data() + Size);
Size += sizeof(T);
if (std::is_floating_point<T>::value) {
More information about the llvm-commits
mailing list