[all-commits] [llvm/llvm-project] 960665: [mlir][Transforms] Fix use-after-free when accessi...

Matthias Springer via All-commits all-commits at lists.llvm.org
Sun Mar 3 18:09:51 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9606655fbb03b1cf1c69d624c7320630e85f33e6
      https://github.com/llvm/llvm-project/commit/9606655fbb03b1cf1c69d624c7320630e85f33e6
  Author: Matthias Springer <me at m-sp.org>
  Date:   2024-03-04 (Mon, 04 Mar 2024)

  Changed paths:
    M mlir/lib/Transforms/Utils/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td

  Log Message:
  -----------
  [mlir][Transforms] Fix use-after-free when accessing replaced block args (#83646)

This commit fixes a bug in a dialect conversion. Currently, when a block
is replaced via a signature conversion, the block is erased during the
"commit" phase. This is problematic because the block arguments may
still be referenced internal data structures of the dialect conversion
(`mapping`). Blocks should be treated same as ops: they should be erased
during the "cleanup" phase.

Note: The test case fails without this fix when running with ASAN, but
may pass when running without ASAN.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list