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

[Unity] Validate struct info in relax::Call constructor #16311

Conversation

Lunderberg
Copy link
Contributor

All operations called by a relax::Call node must have a FuncStructInfo. Prior to this commit, an invalid struct info would be caught by the BlockBuilder during normalization. This delay between the invalid relax::Call being constructed and the invalid relax::Call being detected makes debugging difficult. This commit adds an additional check during the relax::Call constructor, to provide earlier error detection.

All operations called by a `relax::Call` node must have a
`FuncStructInfo`.  Prior to this commit, an invalid struct info would
be caught by the `BlockBuilder` during normalization.  This delay
between the invalid `relax::Call` being constructed and the invalid
`relax::Call` being detected makes debugging difficult.
This commit adds an additional check during the `relax::Call`
constructor, to provide earlier error detection.
Copy link
Contributor

@slyubomirsky slyubomirsky left a comment

Choose a reason for hiding this comment

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

Good improvement.

@Lunderberg Lunderberg merged commit 1af82ad into apache:unity Jan 3, 2024
15 checks passed
@Lunderberg Lunderberg deleted the unity_validate_func_sinfo_in_call_constructor branch January 3, 2024 15:50
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.

2 participants