[all-commits] [llvm/llvm-project] 65330f: [WebAssembly] Do not assume br_table range checks ...

Thomas Lively via All-commits all-commits at lists.llvm.org
Sat Jul 4 18:11:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 65330f394b2c5ede01acb97a84112c3cc0127c46
      https://github.com/llvm/llvm-project/commit/65330f394b2c5ede01acb97a84112c3cc0127c46
  Author: Thomas Lively <tlively at google.com>
  Date:   2020-07-04 (Sat, 04 Jul 2020)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp

  Log Message:
  -----------
  [WebAssembly] Do not assume br_table range checks will be gt_u

OSS-Fuzz and the Emscripten test suite uncovered some edge cases in
which the range check instruction seemed to be an (i32.const 0) or
other unexpected instruction, triggering an assertion. Unfortunately
the reproducers are rather complicated, so they don't make good unit
tests. This commit removes the bad assertion and conservatively
optimizes range checks only when the range check instruction is
i32.gt_u.

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




More information about the All-commits mailing list