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

topdown/copypropagation: only update call bindings when output is cap… #3691

Merged
merged 5 commits into from
Aug 12, 2021

Conversation

srenatus
Copy link
Contributor

…tured

updateBindings before checked if the last operand was a variable, and attempted to
replace it if it was. With neq(s & set(), s), the last operand was a variable,
but not the output variable -- the output wasn't captured.

So now, we use the arity of the called function to determine if we can replace a
call.

Fixes #3071.

…tured

updateBindings before checked if the last operand was a variable, and attempted to
replace it if it was. With `neq(s & set(), s)`, the last operand was a variable,
but not the output variable -- the output wasn't captured.

So now, we use the arity of the called function to determine if we can replace a
call.

Fixes open-policy-agent#3071.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
@srenatus srenatus marked this pull request as ready for review July 30, 2021 09:39
Copy link
Member

@tsandall tsandall left a comment

Choose a reason for hiding this comment

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

LGTM

@tsandall tsandall merged commit ad8a937 into open-policy-agent:main Aug 12, 2021
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.

Stack overflow during partial evaluation
2 participants