[all-commits] [llvm/llvm-project] 5f022a: [mlir] detect integer overflow in debug mode

Aart Bik via All-commits all-commits at lists.llvm.org
Thu Feb 11 18:21:13 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5f022ad6ed8dc23094bb50f83608d5c786a821a9
      https://github.com/llvm/llvm-project/commit/5f022ad6ed8dc23094bb50f83608d5c786a821a9
  Author: Aart Bik <ajcbik at google.com>
  Date:   2021-02-11 (Thu, 11 Feb 2021)

  Changed paths:
    M mlir/lib/IR/BuiltinTypes.cpp

  Log Message:
  -----------
  [mlir] detect integer overflow in debug mode

Rationale:
This computation failed ASAN for the following input
(integer overflow during 4032000000000000000 * 100):

  tensor<100x200x300x400x500x600x700x800xf32>

This change adds a simple overflow detection during
debug mode (which we run more regularly than ASAN).
Arguably this is an unrealistic tensor input, but
in the context of sparse tensors, we may start to
see cases like this.

Bug:
https://bugs.llvm.org/show_bug.cgi?id=49136

Reviewed By: mehdi_amini

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




More information about the All-commits mailing list