[all-commits] [llvm/llvm-project] aa4c76: [mlir][BytecodeReader] Fix crash reading FusedLoc ...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Tue Apr 7 03:52:16 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aa4c76d8fb2211cf911a73533138baa24f23b34d
      https://github.com/llvm/llvm-project/commit/aa4c76d8fb2211cf911a73533138baa24f23b34d
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2026-04-07 (Tue, 07 Apr 2026)

  Changed paths:
    M mlir/include/mlir/IR/BuiltinDialectBytecode.td
    M mlir/unittests/Bytecode/BytecodeTest.cpp

  Log Message:
  -----------
  [mlir][BytecodeReader] Fix crash reading FusedLoc with empty locations (#189228)

FusedLoc::get(context, locs) may return UnknownLoc when locs is empty
and no metadata is provided. The bytecode reader's cBuilder used
cast<FusedLoc>() on this result, which crashes with an assertion
failure.

Fix by giving the FusedLoc DialectAttribute its own cBuilder that passes
Attribute() explicitly, causing getChecked<FusedLoc> to call the
two-parameter storage constructor directly and always produce a
FusedLoc.

Fixes #99626

Assisted-by: Claude Code



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