diff options
author | Alon Zakai <azakai@google.com> | 2019-05-01 09:18:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-01 09:18:44 -0700 |
commit | ac93469d7fde75397403db94d9bf0c1bac0cf60f (patch) | |
tree | 1542a6f13368adf6d797aafc9afe29822bb55fe8 /src/wasm/wasm-emscripten.cpp | |
parent | 8d4bcd6e02bb0df3ac87e4850896ba733525b055 (diff) | |
download | binaryen-ac93469d7fde75397403db94d9bf0c1bac0cf60f.tar.gz binaryen-ac93469d7fde75397403db94d9bf0c1bac0cf60f.tar.bz2 binaryen-ac93469d7fde75397403db94d9bf0c1bac0cf60f.zip |
Proper errors on unsupported segment types in EmscriptenGlueGenerator::separateDataSegments (#2068)
Diffstat (limited to 'src/wasm/wasm-emscripten.cpp')
-rw-r--r-- | src/wasm/wasm-emscripten.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp index c1bb36338..a6a84a974 100644 --- a/src/wasm/wasm-emscripten.cpp +++ b/src/wasm/wasm-emscripten.cpp @@ -1005,7 +1005,12 @@ void EmscriptenGlueGenerator::separateDataSegments(Output* outfile, Address base) { size_t lastEnd = 0; for (Memory::Segment& seg : wasm.memory.segments) { - assert(!seg.isPassive && "separating passive segments not implemented"); + if (seg.isPassive) { + Fatal() << "separating passive segments not implemented"; + } + if (!seg.offset->is<Const>()) { + Fatal() << "separating relocatable segments not implemented"; + } size_t offset = seg.offset->cast<Const>()->value.geti32(); offset -= base; size_t fill = offset - lastEnd; |