[all-commits] [llvm/llvm-project] 3b76b8: [MLIR] Fix crash in test-bytecode-roundtrip when t...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Sat Mar 28 05:55:05 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3b76b85b15a3e7aa004814944f6237f131b95961
https://github.com/llvm/llvm-project/commit/3b76b85b15a3e7aa004814944f6237f131b95961
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-03-28 (Sat, 28 Mar 2026)
Changed paths:
M mlir/test/Bytecode/bytecode_callback.mlir
M mlir/test/lib/IR/TestBytecodeRoundtrip.cpp
Log Message:
-----------
[MLIR] Fix crash in test-bytecode-roundtrip when test dialect is absent (#189163)
When invoking `-test-bytecode-roundtrip=test-dialect-version=X.Y` on a
module that contains no test dialect operations, the reader type
callback in `runTest0` called
`reader.getDialectVersion<test::TestDialect>()` and then immediately
asserted that it succeeded. However, if the test dialect was never
referenced in the bytecode (because no test dialect types appear in the
module), the dialect's version information is not stored in the
bytecode, so `getDialectVersion` legitimately returns failure.
When the test dialect version is unavailable in the bytecode being read,
the module contains no test dialect types, so no "funky"-group overrides
are needed and the callback can safely skip by returning `success()`.
A regression test is added with a module that has no test dialect ops,
exercising the `test-dialect-version=2.0` path that previously crashed.
Fixes #128321
Fixes #128325
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