diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-11-13 16:36:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 16:36:29 -0800 |
commit | b67917ee7392c4d49402cb5e7320e663208390ef (patch) | |
tree | bfc32d7f2bbd007e10dbc6a7c6fa352673552741 /src/wasm/wasm-s-parser.cpp | |
parent | 6b99d143a32263478b7d525886b0bea46cbbdcaa (diff) | |
download | binaryen-b67917ee7392c4d49402cb5e7320e663208390ef.tar.gz binaryen-b67917ee7392c4d49402cb5e7320e663208390ef.tar.bz2 binaryen-b67917ee7392c4d49402cb5e7320e663208390ef.zip |
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.
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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())); } |