[all-commits] [llvm/llvm-project] 4c7552: [MC][WebAssembly] Fix crash when relocation addend...

Sam Clegg via All-commits all-commits at lists.llvm.org
Fri Feb 25 07:15:55 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c75521ce0b1ac55fba1a91ef5156fc811f5dfcb
      https://github.com/llvm/llvm-project/commit/4c75521ce0b1ac55fba1a91ef5156fc811f5dfcb
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2022-02-25 (Fri, 25 Feb 2022)

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

  Log Message:
  -----------
  [MC][WebAssembly] Fix crash when relocation addend underlows U32

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

Differential Revision: https://reviews.llvm.org/D120522




More information about the All-commits mailing list