Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ETC] Don't erase operations used by dead module instances #5357

Merged
merged 1 commit into from
Jun 11, 2023

Conversation

uenoku
Copy link
Member

@uenoku uenoku commented Jun 11, 2023

Fix #5356. There is an edge case that ETC wrongly erase an extracted operation which is still used by (dead) module instances. This issue can be fixed by appropriately updating opsToErase based on opsAiive. inlineInputOnly is reordered since it depends on opsToErase.


// Update `opsToErase`.
if (opsAlive.count(operation))
opsToErase.erase(operation);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that opsToErase is SmallPtrSetImpl so it won't cause an issue like fixed by #5353

@uenoku uenoku changed the title [ETC] Don't erase operations used by dead external module instances [ETC] Don't erase operations used by dead module instances Jun 11, 2023
@uenoku
Copy link
Member Author

uenoku commented Jun 11, 2023

I'm going to merge this to unblock release process. A post-commit is welcomed!

@uenoku uenoku merged commit eb53062 into main Jun 11, 2023
@uenoku uenoku deleted the dev/uenoku/etc-fix branch June 11, 2023 17:46
@mikeurbach
Copy link
Contributor

Awesome, thanks for the quick fix, it looks good to me. Dealing with these extracted instances has always had annoying corners like this, so thanks for adding a test as well to cover it.

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.

[ETC] Crash with null operand in instnace
2 participants