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

[FIRRTL][SpecializeLayers] Fix incorrect CF leading to double free #7200

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

youngar
Copy link
Member

@youngar youngar commented Jun 18, 2024

As a part of specializing layers we have to remove any HierPathOps which included a reference to deleted instances. If any member of the path array is contained in the deleted references list, we need to delete the op. There was incorrect use of continue which caused us to continue processing the path instead of skipping to the next path operation, which could lead to a double free when multiple instances in the path were removed.

As a part of specializing layers we have to remove any HierPathOps which
included a reference to deleted instances.  If any member of the path
array is contained in the deleted references list, we need to delete the
op.  There was incorrect use of `continue` which caused us to continue
processing the path instead of skipping to the next path operation,
which could lead to a double free when multiple instances in the path
were removed.
Copy link
Contributor

@dtzSiFive dtzSiFive left a comment

Choose a reason for hiding this comment

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

LGTM!

@youngar youngar merged commit baec1a1 into llvm:main Jun 18, 2024
4 checks passed
@youngar youngar deleted the firrtl-specialize-layers-broken-paths branch June 18, 2024 15:42
uenoku pushed a commit that referenced this pull request Jul 3, 2024
…7200)

As a part of specializing layers we have to remove any HierPathOps which
included a reference to deleted instances.  If any member of the path
array is contained in the deleted references list, we need to delete the
op.  There was incorrect use of `continue` which caused us to continue
processing the path instead of skipping to the next path operation,
which could lead to a double free when multiple instances in the path
were removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIRRTL Involving the `firrtl` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants