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

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Mar 1 18:37:45 PST 2024


  Branch: refs/heads/users/matthias-springer/erase_block_asan
  Home:   https://github.com/llvm/llvm-project
  Commit: d3248a821240fd1539cb332d55377864323a9268
      https://github.com/llvm/llvm-project/commit/d3248a821240fd1539cb332d55377864323a9268
  Author: Matthias Springer <springerm at google.com>
  Date:   2024-03-02 (Sat, 02 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

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