[llvm] 2481adb - [WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 20:02:46 PDT 2022
Author: Sam Clegg
Date: 2022-03-14T19:57:50-07:00
New Revision: 2481adb59cb63c90879f4537ad36339da3ad61a6
URL: https://github.com/llvm/llvm-project/commit/2481adb59cb63c90879f4537ad36339da3ad61a6
DIFF: https://github.com/llvm/llvm-project/commit/2481adb59cb63c90879f4537ad36339da3ad61a6.diff
LOG: [WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
Added:
Modified:
llvm/lib/Object/WasmObjectFile.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index 8e317b06e9b6b..f53c2a09c1401 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -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 {
More information about the llvm-commits
mailing list