Skip to content

-mm=own: a marker naming a parameter by an identifier is an error, not a crash - #755

Merged
ASDAlexander77 merged 1 commit into
mainfrom
own-marker-identifier-arg
Oct 30, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
own-marker-identifier-arg

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

@keeps(it) (an unquoted parameter name) crashed MLIRGen with an access violation. iterateDecorators evaluates a decorator argument that is not a literal; an identifier that names nothing in scope evaluates to no type, and dyn_cast<LiteralType> of that null type faulted.

  • iterateDecorators: dyn_cast_if_present, so an unreadable argument is skipped instead of crashing.
  • processOwnParamMarkers: an argument of @keeps, @borrows, @lends or @immortalizes that is not a string literal is reported at the argument: '@keeps' takes the names of parameters as strings: '@keeps("it")' (@borrows(this) suggests '@borrows("this")'). Without it the dropped argument would have left the marker naming nothing.

Test: own/own_err_marker_identifier_arg (error test). Full release ctest: 6447/6447 passed (this worktree's build has no gtest, so the unit tests were not built).

🤖 Generated with Claude Code

…t a crash

`@keeps(it)` crashed MLIRGen: iterateDecorators evaluates an argument that
is not a literal, an unresolved identifier evaluates to no type, and the
dyn_cast of that null type faulted. The cast now takes a missing type, and
processOwnParamMarkers reports an argument of @keeps, @borrows, @Lends or
@immortalizes that is not a string literal at the argument:
"'@keeps' takes the names of parameters as strings: '@keeps("it")'".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit fa363de into main Oct 30, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the own-marker-identifier-arg branch October 30, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant