[all-commits] [llvm/llvm-project] d07ab1: [mlir] Add cross-context checks to the IR verifier...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Wed Mar 4 16:54:11 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d07ab183b6695a6262c251d24bb86d4b977aff3d
      https://github.com/llvm/llvm-project/commit/d07ab183b6695a6262c251d24bb86d4b977aff3d
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2026-03-05 (Thu, 05 Mar 2026)

  Changed paths:
    M mlir/lib/IR/Verifier.cpp
    M mlir/unittests/IR/CMakeLists.txt
    A mlir/unittests/IR/VerifierTest.cpp

  Log Message:
  -----------
  [mlir] Add cross-context checks to the IR verifier (#184627)

Detect IR where result types, operand types, or discardable attribute
values come from a different MLIRContext than the operation itself.
Mixing contexts is a latent use-after-free hazard when one context is
destroyed before the other; the verifier now reports a clear error
instead of silently allowing the invalid IR through.

Three new unit tests in MLIRIRTests cover each scenario.

Fix #61569



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