Skip to content

Avoid crash on memref.global without dense initializer#9391

Closed
RCoeurjoly wants to merge 0 commit intollvm:mainfrom
RCoeurjoly:main
Closed

Avoid crash on memref.global without dense initializer#9391
RCoeurjoly wants to merge 0 commit intollvm:mainfrom
RCoeurjoly:main

Conversation

@RCoeurjoly
Copy link
Copy Markdown

FlattenMemRefPass assumes memref.global initializers are DenseElementsAttr and crashes when they are missing or use other ElementsAttr kinds (e.g. dense_resource). Add a guard to avoid dereferencing unsupported initializers.

Fixes #9258.

Copy link
Copy Markdown
Member

@uenoku uenoku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

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.

FlattenMemRefPass crashes on memref.global

2 participants