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

This commit is contained in:
Sam Clegg 2022-03-15 11:36:56 -07:00
parent 7ab1ab0db4
commit 9b27fbd19c
1 changed files with 1 additions and 0 deletions

View File

@ -1535,6 +1535,7 @@ Error WasmObjectFile::parseDataSection(ReadContext &Ctx) {
if (Error Err = readInitExpr(Segment.Data.Offset, Ctx))
return Err;
} else {
Segment.Data.Offset.Extended = false;
Segment.Data.Offset.Inst.Opcode = wasm::WASM_OPCODE_I32_CONST;
Segment.Data.Offset.Inst.Value.Int32 = 0;
}