[all-commits] [llvm/llvm-project] d851fc: [lld][WebAssembly] Do not emit initialization for ...

Thomas Lively via All-commits all-commits at lists.llvm.org
Thu May 21 11:33:47 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d851fce4cb238d5fe85ce71002721dfc2330fa46
      https://github.com/llvm/llvm-project/commit/d851fce4cb238d5fe85ce71002721dfc2330fa46
  Author: Thomas Lively <tlively at google.com>
  Date:   2020-05-21 (Thu, 21 May 2020)

  Changed paths:
    M lld/test/wasm/data-segments.ll
    M lld/wasm/SyntheticSections.cpp
    M lld/wasm/SyntheticSections.h
    M lld/wasm/Writer.cpp

  Log Message:
  -----------
  [lld][WebAssembly] Do not emit initialization for .bss segments

Summary:
This patch fixes a bug where initialization code for .bss segments was
emitted in the memory initialization function even though the .bss
segments were discounted in the datacount section and omitted in the
data section. This was producing invalid binaries due to out-of-bounds
segment indices on the memory.init and data.drop instructions that
were trying to operate on the nonexistent .bss segments.

Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list