Repository navigation
Conversation
An empty inner push or set list indexed the first item and panicked
while loading. A {{variable}} that expands to itself recursed until
the stack overflowed, including after extends merged that variable
into a child regex.
Both cases now return ParseSyntaxError. A cyclic variable inherited
through extends is refused the same way as a regex that cannot compile.
Tests: empty_inner_push_or_set_list_is_an_error,
variable_that_expands_to_itself_is_an_error,
variables_that_expand_through_each_other_are_an_error,
extends_cyclic_variable_does_not_hang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Loading a syntax file panicked or overflowed the stack on two malformed inputs.
push: [[]]andset: [[]]indexed the first item of an empty list.variables: { loop: '{{loop}}' }recursed inresolve_variablesuntil the stack overflowed. The same recursion ran fromSyntaxSetBuilder::buildwhenextendsmerged that variable into a child regex.Both now return
ParseSyntaxError. An empty inner list is a type mismatch, the same error as a context rule that is not a mapping. A variable that expands back to itself isVariableCycle. A child that inherits the cycle is hidden and reported inSyntaxSetBuilderwarnings, which is how a regex that cannot compile is already refused.cargo test --lib parsing::yaml_load::testsis 26 passed. Before the change,empty_inner_push_or_set_list_is_an_errorpanicked at index 0, andvariable_that_expands_to_itself_is_an_erroroverflowed the stack (STATUS_STACK_OVERFLOW).