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

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 11:38:12 PDT 2022


Author: Sam Clegg
Date: 2022-03-15T11:36:56-07:00
New Revision: 9b27fbd19c5618b2f6643bd42d3178b8eba10e2e

URL: https://github.com/llvm/llvm-project/commit/9b27fbd19c5618b2f6643bd42d3178b8eba10e2e
DIFF: https://github.com/llvm/llvm-project/commit/9b27fbd19c5618b2f6643bd42d3178b8eba10e2e.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 f53c2a09c1401..dfb9e2b3eab2b 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -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;
     }


        


More information about the llvm-commits mailing list