[PATCH] D120522: [MC][WebAssembly] Fix crash when relocation addend underlows U32

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 24 15:39:25 PST 2022


sbc100 created this revision.
Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, dschuff.
sbc100 requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

For the object file writer we need to allow the underflow (ar write
zero), but for the final linker output we should probably generate an
error (I've left that as a TODO for now).

Fixes: https://github.com/llvm/llvm-project/issues/54012


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120522

Files:
  lld/test/wasm/reloc-addend.s
  lld/wasm/InputChunks.cpp
  lld/wasm/InputFiles.cpp
  lld/wasm/InputFiles.h
  llvm/lib/MC/WasmObjectWriter.cpp
  llvm/test/MC/WebAssembly/reloc-code.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120522.411247.patch
Type: text/x-patch
Size: 11057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220224/857d0c02/attachment.bin>


More information about the llvm-commits mailing list