-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Stack overflow during partial evaluation #3071
Labels
Comments
srenatus
added a commit
to srenatus/opa
that referenced
this issue
Jul 30, 2021
…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>
tsandall
pushed a commit
that referenced
this issue
Aug 12, 2021
…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. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
jgchn
pushed a commit
to jgchn/opa
that referenced
this issue
Aug 20, 2021
…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>
dolevf
pushed a commit
to dolevf/opa
that referenced
this issue
Nov 4, 2021
…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> Signed-off-by: Dolev Farhi <farhi.dolev@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have recently been using partial evaluation in our application and ran into this issue in one of our rules which we think might be a bug. We use OPA in go, however it can be replicated using partial evaluation in the CLI's eval functionality.
Expected Behavior
When running
opa eval -p -d rule.rego 'data.example.rule'
with the following rego code:we expect a partial result to be evaluated.
Actual Behavior
Currently when running
opa eval -p -d rule.rego 'data.example.rule'
, with code above, we get the followingstack_overflow
error:Meanwhile, if we changed the order between
strings
andstrings & set()
in the operation the rule was able to be partially evaluated.Steps to Reproduce the Problem
The rule.rego file contains the following:
Run partial evaluation.
Additional Info
Full logs
The text was updated successfully, but these errors were encountered: