Skip to content

Conversation

seirl
Copy link
Contributor

@seirl seirl commented Dec 5, 2024

Minimal repro:

rule:
  match:
    - condition: "1 < 0"
      output: "true"
    - condition: "1 > 0"
      rule:
        match:
          - output: "'false'"

This would segfault the Policy Compiler, because it would try to access .Output().SourceID() of the second block to log an error, but .Output() is nil for nested rules.

@seirl seirl force-pushed the fix_output_match_crash branch 2 times, most recently from bf2f3c1 to 5bcce86 Compare December 5, 2024 15:22
Minimal repro:

    rule:
      match:
        - condition: "1 < 0"
          output: "true"
        - condition: "1 > 0"
          rule:
            match:
              - output: "'false'"

This would segfault the Policy Compiler, because it would try to access
`.Output().SourceID()` of the second block to log an error, but
`.Output()` is nil for nested rules.
@seirl seirl force-pushed the fix_output_match_crash branch from 5bcce86 to e0e5c50 Compare December 5, 2024 15:23
@TristonianJones TristonianJones merged commit c096438 into google:master Dec 5, 2024
2 checks passed
@seirl seirl deleted the fix_output_match_crash branch December 5, 2024 15:39
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