[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349

This commit is contained in:
Sam Clegg 2022-03-14 19:57:12 -07:00
parent 98dd390573
commit 2481adb59c
1 changed files with 1 additions and 0 deletions

View File

@ -1474,6 +1474,7 @@ Error WasmObjectFile::parseElemSection(ReadContext &Ctx) {
object_error::parse_failed);
if (Segment.Flags & wasm::WASM_ELEM_SEGMENT_IS_PASSIVE) {
Segment.Offset.Extended = false;
Segment.Offset.Inst.Opcode = wasm::WASM_OPCODE_I32_CONST;
Segment.Offset.Inst.Value.Int32 = 0;
} else {