[llvm-branch-commits] [lld] release/19.x: [lld][WebAssembly] Fix use of uninitialized stack data with --wasm64 (#107780) (PR #119723)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 12 09:15:32 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld-wasm
Author: None (llvmbot)
<details>
<summary>Changes</summary>
Backport 5c8fd1eece8fff69871cef57a2363dc0f734a7d1
Requested by: @<!-- -->nikic
---
Full diff: https://github.com/llvm/llvm-project/pull/119723.diff
1 Files Affected:
- (modified) lld/wasm/SyntheticSections.cpp (+1-2)
``````````diff
diff --git a/lld/wasm/SyntheticSections.cpp b/lld/wasm/SyntheticSections.cpp
index f02f55519a2512..72d08b849d8e86 100644
--- a/lld/wasm/SyntheticSections.cpp
+++ b/lld/wasm/SyntheticSections.cpp
@@ -587,8 +587,7 @@ void ElemSection::writeBody() {
initExpr.Inst.Value.Global = WasmSym::tableBase->getGlobalIndex();
} else {
bool is64 = config->is64.value_or(false);
- initExpr.Inst.Opcode = is64 ? WASM_OPCODE_I64_CONST : WASM_OPCODE_I32_CONST;
- initExpr.Inst.Value.Int32 = config->tableBase;
+ initExpr = intConst(config->tableBase, is64);
}
writeInitExpr(os, initExpr);
``````````
</details>
https://github.com/llvm/llvm-project/pull/119723
More information about the llvm-branch-commits
mailing list