From b67917ee7392c4d49402cb5e7320e663208390ef Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 13 Nov 2018 16:36:29 -0800 Subject: Fix alignment in MixedAllocator (#1740) Necessary for simd, as we add a type with alignment >8. We were just broken on that before this PR. --- src/wasm/wasm-s-parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wasm/wasm-s-parser.cpp') diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index b81b32ad6..79407a3f8 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -166,7 +166,7 @@ void SExpressionParser::parseDebugLocation() { return; // no column number } std::string colStr(++pos, debugLocEnd); - void* buf = allocator.allocSpace(sizeof(SourceLocation)); + void* buf = allocator.allocSpace(sizeof(SourceLocation), alignof(SourceLocation)); loc = new (buf) SourceLocation(IString(name.c_str(), false), atoi(lineStr.c_str()), atoi(colStr.c_str())); } -- cgit v1.2.3